graphql 2.4.16 → 2.4.18

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: de438ab024dd0f9529cca84745fb63e84189d7e85eb447cfaba1b34f1d18e14f
4
- data.tar.gz: bbdf79794313f06b060ade4125e90bf66ec70ab243e7a27033ad553d576720f1
3
+ metadata.gz: 76d6fdfc4ca578bf27c9cd7f18d22963df0b369e51feafe3ffec1e3ccbe51394
4
+ data.tar.gz: 3b5511d503a014cdae7b893d1e131f01fa2ea6672732c476dfc8f2406f50bdbd
5
5
  SHA512:
6
- metadata.gz: d2d1b6a04aadd7133ecf3095cb8440d581e461027ac97b69dd4bba5c1839f796eb68d6b2062665ddd42aa52be26328460a2ef81d82eb66c2f39719b2ee2b986d
7
- data.tar.gz: 2f852d8d9c11339fd0de30badffea53f2b79eaa34484e1e833ff60a899ba2ff617e9b4348729b687cbd02629049bc99812c258d368831017d76e566fb770cc62
6
+ metadata.gz: 252ad741c9f41e11579dc41659dc9fe20ba78ecc9cc57573f5e120dd460337804052046b5128428753f449a4f65004630d8565878bae17dfdfb7229a812faf6f
7
+ data.tar.gz: 32dfb1294ee65efe8f4245f2c7b31c3437dfe0950951ccc878c26cc821715f5e725b02c138ee393384f11ebfef84a20b10b08c2cbf4555e4f94e11bd9ae53a7e
@@ -23,7 +23,15 @@ module GraphQL
23
23
  attr_reader :pos, :tokens_count
24
24
 
25
25
  def advance
26
- @scanner.skip(IGNORE_REGEXP)
26
+ loop do
27
+ @scanner.skip(IGNORE_REGEXP)
28
+ if @scanner.skip(COMMENT_REGEXP)
29
+ @tokens_count += 1
30
+ next
31
+ end
32
+ break
33
+ end
34
+
27
35
  if @scanner.eos?
28
36
  @finished = true
29
37
  return false
@@ -173,12 +181,8 @@ module GraphQL
173
181
  raise GraphQL::ParseError.new(message, line, col, @string, filename: @filename)
174
182
  end
175
183
 
176
- IGNORE_REGEXP = %r{
177
- (?:
178
- [, \c\r\n\t]+ |
179
- \#.*$
180
- )*
181
- }x
184
+ IGNORE_REGEXP = /[, \c\r\n\t]+/
185
+ COMMENT_REGEXP = /\#[^\n]*/
182
186
  IDENTIFIER_REGEXP = /[_A-Za-z][_0-9A-Za-z]*/
183
187
  INT_REGEXP = /-?(?:[0]|[1-9][0-9]*)/
184
188
  FLOAT_DECIMAL_REGEXP = /[.][0-9]+/
@@ -232,7 +232,7 @@ module GraphQL
232
232
 
233
233
  # @return [Boolean] True if this type is used for `loads:` but not in the schema otherwise and not _explicitly_ hidden.
234
234
  def loadable?(type, _ctx)
235
- !reachable_type_set.include?(type) && visible_type?(type)
235
+ visible_type?(type) && !referenced?(type)
236
236
  end
237
237
 
238
238
  def loadable_possible_types(union_type, _ctx)
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module GraphQL
3
- VERSION = "2.4.16"
3
+ VERSION = "2.4.18"
4
4
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.16
4
+ version: 2.4.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Mosolgo
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-04-01 00:00:00.000000000 Z
10
+ date: 2026-04-27 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: base64
@@ -799,7 +799,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
799
799
  - !ruby/object:Gem::Version
800
800
  version: '0'
801
801
  requirements: []
802
- rubygems_version: 3.6.6
802
+ rubygems_version: 4.0.6
803
803
  specification_version: 4
804
804
  summary: A GraphQL language and runtime for Ruby
805
805
  test_files: []