graphql 1.12.0 → 1.12.1

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: 433f1170eb17ab192761efcd8c27cf9efe5f952ab47b501baca270e33d6007cd
4
- data.tar.gz: c56045f746385ae37ebd0f82116aad10782e9265c13e0e85e39488ef3db02c74
3
+ metadata.gz: 292a830cc392302b9cb20a7290b8026bc8c0d56982b64f3675ab0617341a82a6
4
+ data.tar.gz: 3d1b22c24b94f9352e295bf0c3ca714437f3bff82694ca69a075c43fb1c2520a
5
5
  SHA512:
6
- metadata.gz: 6d580c78b6b659602067fcfd3043eff7ef2b20da1d50c1ca2b234614d864e1a232cb65e7456cfdf85764523f30bd5232823ea19b4664208aef875cc68e2e5fc9
7
- data.tar.gz: 172bc16fadfeee1f022646498dd2ce359bd885fb96ddbeeab50f7583d27811501e583194dd582a7cf47d63545c2fe00c4fa4625b6b247155f537ff4a6de60ac1
6
+ metadata.gz: 5711c019ac9b7fcffd0224d8438f5dea04c114a5e170900ec292c3f80a8b672a0a13d4449188888f85c83b4f386a7276a3d91530f38a4bf66df21608711cf95b
7
+ data.tar.gz: 6fb9c18db01f800f9b018dc8c1a1e27c463b6ab7a81f7de59c9d30967f409c25061b779eb672b828058d769b9aebab8c5f45406a373869a893d6b5a5e574572f
@@ -36,7 +36,7 @@ module GraphQL
36
36
  }
37
37
  }
38
38
  @waiting_fibers = []
39
- @yielded_fibers = Set.new
39
+ @yielded_fibers = {}
40
40
  end
41
41
 
42
42
  # @return [Hash] the {Multiplex} context
@@ -69,9 +69,10 @@ module GraphQL
69
69
  nil
70
70
  end
71
71
 
72
- # @return [Boolean] Returns true if the current Fiber has yielded once via Dataloader
73
- def yielded?
74
- @yielded_fibers.include?(Fiber.current)
72
+ # @param path [Array<String, Integer>] A graphql response path
73
+ # @return [Boolean] True if the current Fiber has yielded once via Dataloader at {path}
74
+ def yielded?(path)
75
+ @yielded_fibers[Fiber.current] == path
75
76
  end
76
77
 
77
78
  # Run all Fibers until they're all done
@@ -160,7 +161,7 @@ module GraphQL
160
161
  if fiber.alive?
161
162
  if !@yielded_fibers.include?(fiber)
162
163
  # This fiber hasn't yielded yet, we should enqueue a continuation fiber
163
- @yielded_fibers.add(fiber)
164
+ @yielded_fibers[fiber] = current_runtime.progress_path
164
165
  current_runtime.enqueue_selections_fiber
165
166
  end
166
167
  fiber_stack << fiber
@@ -15,7 +15,7 @@ module GraphQL
15
15
  # executed sychronously.
16
16
  def run; end
17
17
  def yield; end
18
- def yielded?; false; end
18
+ def yielded?(_path); false; end
19
19
  end
20
20
  end
21
21
  end
@@ -188,13 +188,15 @@ module GraphQL
188
188
  evaluate_selection(path, result_name, field_ast_nodes_or_ast_node, scoped_context, owner_object, owner_type, is_eager_selection)
189
189
  # The dataloader knows if ^^ that selection halted and later selections were executed in another fiber.
190
190
  # If that's the case, then don't continue execution here.
191
- if @dataloader.yielded?
191
+ if @dataloader.yielded?(path)
192
192
  break
193
193
  end
194
194
  end
195
195
  nil
196
196
  end
197
197
 
198
+ attr_reader :progress_path
199
+
198
200
  # @return [void]
199
201
  def evaluate_selection(path, result_name, field_ast_nodes_or_ast_node, scoped_context, owner_object, owner_type, is_eager_field)
200
202
  # As a performance optimization, the hash key will be a `Node` if
@@ -1,4 +1,6 @@
1
1
  # frozen_string_literal: true
2
+ require "timeout"
3
+
2
4
  module GraphQL
3
5
  module StaticValidation
4
6
  # Initialized with a {GraphQL::Schema}, then it can validate {GraphQL::Language::Nodes::Documents}s based on that schema.
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module GraphQL
3
- VERSION = "1.12.0"
3
+ VERSION = "1.12.1"
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: 1.12.0
4
+ version: 1.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Mosolgo
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-20 00:00:00.000000000 Z
11
+ date: 2021-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: benchmark-ips
@@ -318,6 +318,20 @@ dependencies:
318
318
  - - "~>"
319
319
  - !ruby/object:Gem::Version
320
320
  version: 1.5.0
321
+ - !ruby/object:Gem::Dependency
322
+ name: webrick
323
+ requirement: !ruby/object:Gem::Requirement
324
+ requirements:
325
+ - - ">="
326
+ - !ruby/object:Gem::Version
327
+ version: '0'
328
+ type: :development
329
+ prerelease: false
330
+ version_requirements: !ruby/object:Gem::Requirement
331
+ requirements:
332
+ - - ">="
333
+ - !ruby/object:Gem::Version
334
+ version: '0'
321
335
  description: A plain-Ruby implementation of GraphQL.
322
336
  email:
323
337
  - rdmosolgo@gmail.com
@@ -766,7 +780,7 @@ metadata:
766
780
  source_code_uri: https://github.com/rmosolgo/graphql-ruby
767
781
  bug_tracker_uri: https://github.com/rmosolgo/graphql-ruby/issues
768
782
  mailing_list_uri: https://tinyletter.com/graphql-ruby
769
- post_install_message:
783
+ post_install_message:
770
784
  rdoc_options: []
771
785
  require_paths:
772
786
  - lib
@@ -781,8 +795,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
781
795
  - !ruby/object:Gem::Version
782
796
  version: '0'
783
797
  requirements: []
784
- rubygems_version: 3.2.3
785
- signing_key:
798
+ rubygems_version: 3.0.3
799
+ signing_key:
786
800
  specification_version: 4
787
801
  summary: A GraphQL language and runtime for Ruby
788
802
  test_files: []