graphql 1.12.10 → 1.12.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/lib/graphql/backtrace/table.rb +14 -2
  3. data/lib/graphql/backtrace/tracer.rb +7 -4
  4. data/lib/graphql/cop/nullability.rb +28 -0
  5. data/lib/graphql/cop/resolve_methods.rb +28 -0
  6. data/lib/graphql/dataloader.rb +27 -14
  7. data/lib/graphql/dataloader/null_dataloader.rb +1 -0
  8. data/lib/graphql/execution/execute.rb +1 -1
  9. data/lib/graphql/execution/interpreter.rb +4 -8
  10. data/lib/graphql/execution/interpreter/arguments_cache.rb +3 -2
  11. data/lib/graphql/execution/interpreter/resolve.rb +6 -2
  12. data/lib/graphql/execution/interpreter/runtime.rb +482 -203
  13. data/lib/graphql/execution/lazy.rb +5 -1
  14. data/lib/graphql/introspection/schema_type.rb +1 -1
  15. data/lib/graphql/query.rb +1 -1
  16. data/lib/graphql/schema.rb +34 -200
  17. data/lib/graphql/schema/addition.rb +238 -0
  18. data/lib/graphql/schema/argument.rb +56 -39
  19. data/lib/graphql/schema/build_from_definition.rb +8 -2
  20. data/lib/graphql/schema/directive/transform.rb +13 -1
  21. data/lib/graphql/schema/enum.rb +10 -1
  22. data/lib/graphql/schema/input_object.rb +11 -15
  23. data/lib/graphql/schema/member/build_type.rb +1 -0
  24. data/lib/graphql/schema/printer.rb +11 -16
  25. data/lib/graphql/schema/resolver.rb +28 -3
  26. data/lib/graphql/types/relay/has_node_field.rb +1 -1
  27. data/lib/graphql/types/relay/has_nodes_field.rb +1 -1
  28. data/lib/graphql/types/relay/node_field.rb +2 -2
  29. data/lib/graphql/types/relay/nodes_field.rb +2 -2
  30. data/lib/graphql/version.rb +1 -1
  31. data/readme.md +0 -3
  32. metadata +5 -17
  33. data/lib/graphql/execution/interpreter/hash_response.rb +0 -46
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.10
4
+ version: 1.12.14
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-05-18 00:00:00.000000000 Z
11
+ date: 2021-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: benchmark-ips
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: codeclimate-test-reporter
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '0.4'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '0.4'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: concurrent-ruby
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -332,6 +318,8 @@ files:
332
318
  - lib/graphql/compatibility/query_parser_specification/parse_error_specification.rb
333
319
  - lib/graphql/compatibility/query_parser_specification/query_assertions.rb
334
320
  - lib/graphql/compatibility/schema_parser_specification.rb
321
+ - lib/graphql/cop/nullability.rb
322
+ - lib/graphql/cop/resolve_methods.rb
335
323
  - lib/graphql/dataloader.rb
336
324
  - lib/graphql/dataloader/null_dataloader.rb
337
325
  - lib/graphql/dataloader/request.rb
@@ -369,7 +357,6 @@ files:
369
357
  - lib/graphql/execution/interpreter/arguments_cache.rb
370
358
  - lib/graphql/execution/interpreter/execution_errors.rb
371
359
  - lib/graphql/execution/interpreter/handles_raw_value.rb
372
- - lib/graphql/execution/interpreter/hash_response.rb
373
360
  - lib/graphql/execution/interpreter/resolve.rb
374
361
  - lib/graphql/execution/interpreter/runtime.rb
375
362
  - lib/graphql/execution/lazy.rb
@@ -485,6 +472,7 @@ files:
485
472
  - lib/graphql/runtime_type_error.rb
486
473
  - lib/graphql/scalar_type.rb
487
474
  - lib/graphql/schema.rb
475
+ - lib/graphql/schema/addition.rb
488
476
  - lib/graphql/schema/argument.rb
489
477
  - lib/graphql/schema/base_64_bp.rb
490
478
  - 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