You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p><em>note</em>: Setting <codeclass="highlighter-rouge">always_include_resource_ids: true</code> could result in 1+N queries (see <ahref="https://github.com/graphiti-api/graphiti/issues/167#issuecomment-686866646">#167</a>)</p>
Copy file name to clipboardExpand all lines: guides/concepts/resources.md
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -935,10 +935,13 @@ has_many :positions,
935
935
resource: EmployeeResource,
936
936
readable: true,
937
937
writable: true,
938
-
link: self.autolink # default true
939
-
single: false # only allow this sideload when one employee
938
+
link: self.autolink, # default true
939
+
single: false, # only allow this sideload when one employee
940
+
always_include_resource_ids: false
940
941
{% endhighlight %}
941
942
943
+
*note*: Setting `always_include_resource_ids: true` could result in 1+N queries (see [#167](https://github.com/graphiti-api/graphiti/issues/167#issuecomment-686866646))
944
+
942
945
{% include h.html tag="h5" text="5.2.1 Customizing Scope" a="customizing-scope" %}
943
946
944
947
Use `params` to change the query parameters that will be passed to the
@@ -1021,6 +1024,7 @@ Defaults to these common options:
1021
1024
has_many :positions,
1022
1025
foreign_key: :employee_id,
1023
1026
primary_key: :id,
1027
+
always_include_resource_ids: false,
1024
1028
resource: PositionResource
1025
1029
{% endhighlight %}
1026
1030
@@ -1064,6 +1068,7 @@ Defaults to these common options:
0 commit comments