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
raise"Unexpected selection in partial path: #{sel.class}, #{sel.inspect}"
65
-
end
66
-
end
67
-
end
68
35
69
-
ifnext_selections.empty?
70
-
raiseArgumentError,"Path `#{@path.inspect}` is not present in this query. `#{name_in_doc.inspect}` was not found. Try a different path or rewrite the query to include it."
71
-
end
72
-
field_name=next_selections.first.name
73
-
field_defn=@schema.get_field(type,field_name,@query.context) || raise("Invariant: no field called #{field_name} on #{type.graphql_name}")
74
-
parent_type=type
75
-
type=field_defn.type
76
-
iftype.non_null?
77
-
type=type.of_type
78
-
end
79
-
selections=next_selections
36
+
iffragment_node
37
+
@ast_nodes=[fragment_node]
38
+
@root_type=type || raise(ArgumentError,"Pass `type:` when using `node:`")
39
+
# This is only used when `@leaf`
40
+
@field_definition=nil
41
+
elsifpath.nil?
42
+
raiseArgumentError,"`path:` is required if `node:` is not given; add `path:`"
raise"Unexpected selection in partial path: #{sel.class}, #{sel.inspect}"
156
+
end
157
+
end
158
+
end
159
+
160
+
ifnext_selections.empty?
161
+
raiseArgumentError,"Path `#{@path.inspect}` is not present in this query. `#{name_in_doc.inspect}` was not found. Try a different path or rewrite the query to include it."
162
+
end
163
+
field_name=next_selections.first.name
164
+
field_defn=@schema.get_field(type,field_name,@query.context) || raise("Invariant: no field called #{field_name} on #{type.graphql_name}")
0 commit comments