graphql 2.2.13 → 2.2.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of graphql might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1a0011bdb75efaaad6d3b2b56dd9ad5302c58b85cec60c676aab08a857f8da23
4
- data.tar.gz: 3816babbb95e6798bcd0368efba9f0e64c8abeaa12a7fe153efe21c711ed4ed8
3
+ metadata.gz: 97a3329554b8a2a453ae6181344fd806401a9766850036ed43524c34d9926e8a
4
+ data.tar.gz: 6f09c75f883f6191a0ef98904bb3e4be722097dde6370813947e1cffdbc254ae
5
5
  SHA512:
6
- metadata.gz: 6ff0e5f9ed0aa3eb37063d77507927673d1f12286bbcc72ec8e5c6b9e1d419a58b5c59b3981b5df04376c415ea83c59969d7ad1d0b9ea97cc65d1bc3412121d6
7
- data.tar.gz: a59c9c9aadcba96a84079c2f428488b0258a4f68cff547db6b4c3bedbf6fcf8d78cb92fe88b6983f733f4151ecf9446bd3c59509a26e14086da52aead627aacc
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}"
@@ -89,6 +89,8 @@ module GraphQL
89
89
  "..."
90
90
  elsif token_name == :STRING
91
91
  string_value
92
+ elsif @scanner.matched_size.nil?
93
+ @scanner.peek(1)
92
94
  else
93
95
  token_value
94
96
  end
@@ -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
- if token_name && Lexer::Punctuation.const_defined?(token_name)
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
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module GraphQL
3
- VERSION = "2.2.13"
3
+ VERSION = "2.2.15"
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.13
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-03-11 00:00:00.000000000 Z
11
+ date: 2024-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base64