graphql 1.12.7 → 1.12.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generators/graphql/install_generator.rb +1 -1
  3. data/lib/generators/graphql/templates/graphql_controller.erb +2 -2
  4. data/lib/graphql.rb +10 -10
  5. data/lib/graphql/backtrace/table.rb +14 -2
  6. data/lib/graphql/dataloader.rb +59 -15
  7. data/lib/graphql/dataloader/null_dataloader.rb +1 -0
  8. data/lib/graphql/execution/errors.rb +4 -4
  9. data/lib/graphql/execution/execute.rb +1 -1
  10. data/lib/graphql/execution/interpreter.rb +4 -8
  11. data/lib/graphql/execution/interpreter/arguments_cache.rb +3 -2
  12. data/lib/graphql/execution/interpreter/runtime.rb +382 -223
  13. data/lib/graphql/introspection/schema_type.rb +1 -1
  14. data/lib/graphql/pagination/connections.rb +1 -1
  15. data/lib/graphql/query/null_context.rb +7 -1
  16. data/lib/graphql/rake_task.rb +3 -0
  17. data/lib/graphql/schema.rb +44 -218
  18. data/lib/graphql/schema/addition.rb +238 -0
  19. data/lib/graphql/schema/argument.rb +55 -36
  20. data/lib/graphql/schema/directive/transform.rb +13 -1
  21. data/lib/graphql/schema/input_object.rb +2 -2
  22. data/lib/graphql/schema/loader.rb +8 -0
  23. data/lib/graphql/schema/member/base_dsl_methods.rb +3 -15
  24. data/lib/graphql/schema/object.rb +19 -5
  25. data/lib/graphql/schema/resolver.rb +46 -24
  26. data/lib/graphql/schema/scalar.rb +3 -1
  27. data/lib/graphql/static_validation/rules/directives_are_defined.rb +1 -1
  28. data/lib/graphql/static_validation/rules/fields_will_merge.rb +17 -8
  29. data/lib/graphql/static_validation/rules/required_input_object_attributes_are_present.rb +1 -1
  30. data/lib/graphql/static_validation/validator.rb +5 -0
  31. data/lib/graphql/subscriptions/action_cable_subscriptions.rb +4 -3
  32. data/lib/graphql/subscriptions/serialize.rb +11 -1
  33. data/lib/graphql/version.rb +1 -1
  34. metadata +17 -3
  35. data/lib/graphql/execution/interpreter/hash_response.rb +0 -46
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module GraphQL
3
- VERSION = "1.12.7"
3
+ VERSION = "1.12.12"
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.7
4
+ version: 1.12.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Mosolgo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-07 00:00:00.000000000 Z
11
+ date: 2021-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: benchmark-ips
@@ -150,6 +150,20 @@ dependencies:
150
150
  - - '='
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0.68'
153
+ - !ruby/object:Gem::Dependency
154
+ name: stackprof
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
153
167
  - !ruby/object:Gem::Dependency
154
168
  name: parser
155
169
  requirement: !ruby/object:Gem::Requirement
@@ -369,7 +383,6 @@ files:
369
383
  - lib/graphql/execution/interpreter/arguments_cache.rb
370
384
  - lib/graphql/execution/interpreter/execution_errors.rb
371
385
  - lib/graphql/execution/interpreter/handles_raw_value.rb
372
- - lib/graphql/execution/interpreter/hash_response.rb
373
386
  - lib/graphql/execution/interpreter/resolve.rb
374
387
  - lib/graphql/execution/interpreter/runtime.rb
375
388
  - lib/graphql/execution/lazy.rb
@@ -485,6 +498,7 @@ files:
485
498
  - lib/graphql/runtime_type_error.rb
486
499
  - lib/graphql/scalar_type.rb
487
500
  - lib/graphql/schema.rb
501
+ - lib/graphql/schema/addition.rb
488
502
  - lib/graphql/schema/argument.rb
489
503
  - lib/graphql/schema/base_64_bp.rb
490
504
  - lib/graphql/schema/base_64_encoder.rb
@@ -1,46 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module GraphQL
4
- module Execution
5
- class Interpreter
6
- # This response class handles `#write` by accumulating
7
- # values into a Hash.
8
- class HashResponse
9
- def initialize
10
- @result = {}
11
- end
12
-
13
- def final_value
14
- @result
15
- end
16
-
17
- def inspect
18
- "#<#{self.class.name} result=#{@result.inspect}>"
19
- end
20
-
21
- # Add `value` at `path`.
22
- # @return [void]
23
- def write(path, value)
24
- if path.empty?
25
- @result = value
26
- elsif (write_target = @result)
27
- i = 0
28
- prefinal_steps = path.size - 1
29
- # Use `while` to avoid a closure
30
- while i < prefinal_steps
31
- path_part = path[i]
32
- i += 1
33
- write_target = write_target[path_part]
34
- end
35
- path_part = path[i]
36
- write_target[path_part] = value
37
- else
38
- # The response is completely nulled out
39
- end
40
-
41
- nil
42
- end
43
- end
44
- end
45
- end
46
- end