We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20daafa commit 2a83d6bCopy full SHA for 2a83d6b
lib/graphiti/util/serializer_relationships.rb
@@ -49,10 +49,13 @@ def block
49
data_proc_ref = data_proc
50
self_ref = self
51
validate_link! if eagerly_validate_links?
52
-
53
proc do
54
data { instance_eval(&data_proc_ref) }
55
+ # include relationship links for belongs_to relationships
56
+ # https://github.com/graphiti-api/graphiti/issues/167
57
+ linkage always: true if sideload_ref.type == :belongs_to
58
+
59
if link_ref
60
if @proxy.query.links?
61
self_ref.send(:validate_link!) unless self_ref.send(:eagerly_validate_links?)
0 commit comments