graphql 2.2.14 → 2.2.16

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f35b5aadaa5d2666f3f41f3347a0dec2a3799e747e0f70c4075ab9dd21e6c965
4
- data.tar.gz: b5f5b6ed45a287fdb8a7e29b0e45b13fc3093c9040a85a5c139db3c9df1ca41e
3
+ metadata.gz: 444884ff51b3699ea4b1b34cd89d3e686900ec53e59b502bd062ef295494271f
4
+ data.tar.gz: d4bbddeb926a6106a38d029f7fbd23b63c2020ee371978aef8b0cf20313f47a1
5
5
  SHA512:
6
- metadata.gz: 3bb546944fd6a331ffaeba21130ce6253d372300b3ff3b7252d7d8da934a5ae7b4f95503128855e19fa5f860ef4e9868103f4212e068c556f0f9908ed051f0dc
7
- data.tar.gz: 0d2f779dbfd416d92ec46774178f7556dfdac7e5c3e70b54a816de32af5f849493da8771e679e7555209e9ea2ab62702e574bc1a9416a328e9afbc74ac8a4306
6
+ metadata.gz: c67c98945049adf941c6c9ed1819a9c8e85d3df9992d1186f1d6165a2b599ad8f51973bd34060e425c44edb58e542568810e7fa48acb1f726a1e837de423717b
7
+ data.tar.gz: 78d57fe6de8cf176671088913d123d5d8986e98e37cc67b280d4ae9a3d98070cde2bd29cf2a4be777acd62653f2d0ce8204e303d6ee24b6d423fa538f23b6308
@@ -187,7 +187,11 @@ ERR
187
187
  end
188
188
  result = @results[key]
189
189
 
190
- raise result if result.class <= StandardError
190
+ if result.is_a?(StandardError)
191
+ # Dup it because the rescuer may modify it.
192
+ # (This happens for GraphQL::ExecutionErrors, at least)
193
+ raise result.dup
194
+ end
191
195
 
192
196
  result
193
197
  end
@@ -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}"
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module GraphQL
3
- VERSION = "2.2.14"
3
+ VERSION = "2.2.16"
4
4
  end
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.14
4
+ version: 2.2.16
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-03-18 00:00:00.000000000 Z
11
+ date: 2024-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base64
@@ -645,7 +645,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
645
645
  - !ruby/object:Gem::Version
646
646
  version: '0'
647
647
  requirements: []
648
- rubygems_version: 3.5.3
648
+ rubygems_version: 3.5.12
649
649
  signing_key:
650
650
  specification_version: 4
651
651
  summary: A GraphQL language and runtime for Ruby