graphql 2.2.13 → 2.2.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/graphql/execution/interpreter/runtime.rb +12 -4
- data/lib/graphql/language/lexer.rb +2 -0
- data/lib/graphql/language/parser.rb +1 -7
- data/lib/graphql/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97a3329554b8a2a453ae6181344fd806401a9766850036ed43524c34d9926e8a
|
4
|
+
data.tar.gz: 6f09c75f883f6191a0ef98904bb3e4be722097dde6370813947e1cffdbc254ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0e2e30fe49a44858f5c57ca7ea923c1aa8b87471f1448f5f2e3a94fbf43660d205e22ebf47a0527ed8d495cb5f4273231d678c7604cb096391a023d59b6e3e3
|
7
|
+
data.tar.gz: 77fe89ed92e533fe2e8a900cddaf2c245f78304d8129d1e154bbdf3f0d8057011de21a21129cf96195be2ec1f6c626faca9689f7cedca2cf10ba5cbc3e4f7e52
|
@@ -137,7 +137,6 @@ module GraphQL
|
|
137
137
|
end
|
138
138
|
|
139
139
|
def gather_selections(owner_object, owner_type, selections, selections_to_run = nil, selections_by_name = {})
|
140
|
-
|
141
140
|
selections.each do |node|
|
142
141
|
# Skip gathering this if the directive says so
|
143
142
|
if !directives_include?(node, owner_object, owner_type)
|
@@ -182,17 +181,26 @@ module GraphQL
|
|
182
181
|
type_defn = schema.get_type(node.type.name, context)
|
183
182
|
|
184
183
|
if query.warden.possible_types(type_defn).include?(owner_type)
|
185
|
-
gather_selections(owner_object, owner_type, node.selections, selections_to_run, next_selections)
|
184
|
+
result = gather_selections(owner_object, owner_type, node.selections, selections_to_run, next_selections)
|
185
|
+
if !result.equal?(next_selections)
|
186
|
+
selections_to_run = result
|
187
|
+
end
|
186
188
|
end
|
187
189
|
else
|
188
190
|
# it's an untyped fragment, definitely continue
|
189
|
-
gather_selections(owner_object, owner_type, node.selections, selections_to_run, next_selections)
|
191
|
+
result = gather_selections(owner_object, owner_type, node.selections, selections_to_run, next_selections)
|
192
|
+
if !result.equal?(next_selections)
|
193
|
+
selections_to_run = result
|
194
|
+
end
|
190
195
|
end
|
191
196
|
when GraphQL::Language::Nodes::FragmentSpread
|
192
197
|
fragment_def = query.fragments[node.name]
|
193
198
|
type_defn = query.get_type(fragment_def.type.name)
|
194
199
|
if query.warden.possible_types(type_defn).include?(owner_type)
|
195
|
-
gather_selections(owner_object, owner_type, fragment_def.selections, selections_to_run, next_selections)
|
200
|
+
result = gather_selections(owner_object, owner_type, fragment_def.selections, selections_to_run, next_selections)
|
201
|
+
if !result.equal?(next_selections)
|
202
|
+
selections_to_run = result
|
203
|
+
end
|
196
204
|
end
|
197
205
|
else
|
198
206
|
raise "Invariant: unexpected selection class: #{node.class}"
|
@@ -739,13 +739,7 @@ module GraphQL
|
|
739
739
|
# token_value works for when the scanner matched something
|
740
740
|
# which is usually fine and it's good for it to be fast at that.
|
741
741
|
def debug_token_value
|
742
|
-
|
743
|
-
Lexer::Punctuation.const_get(token_name)
|
744
|
-
elsif token_name == :ELLIPSIS
|
745
|
-
"..."
|
746
|
-
else
|
747
|
-
@lexer.token_value
|
748
|
-
end
|
742
|
+
@lexer.debug_token_value(token_name)
|
749
743
|
end
|
750
744
|
end
|
751
745
|
end
|
data/lib/graphql/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Mosolgo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: base64
|