graphql 2.0.4 → 2.0.5

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: 823ea48d61ed1b30e6ad87a6817f80206b9c5d8865f6350cbd142c9798162e37
4
- data.tar.gz: 8e5f383cfe80418109b0f424d06ab7a78c72255d167f21f32b6c8f6bcef10610
3
+ metadata.gz: 248d39942011f4175ee77643a6e8d103d17d60ac73ee95418eb25e0eee2bbb27
4
+ data.tar.gz: 062c4d1402adf7f3612d888c6e00df91623340239996b6bc14db59ebbec41814
5
5
  SHA512:
6
- metadata.gz: 95e9de185715e1b2a752ecaefdd75e8b4daad8afd4125429d58627972805d759c3a842a58bec29b0b5ee1aba5e1d06a6cb1aed9bd1881653d710f71fe4edfdc7
7
- data.tar.gz: 99ff2f59d77ee74ba4c1af7fcf097afb5415b6d18a95c1a2527413d6f782f8fa6238aafa96430d2d7332f1177e64b70e5aa2eac1557d042ede9eb4a33466b8b5
6
+ metadata.gz: 87813bc8354e52215099b99f932b615856337649897313982e7945b9f039625fd4a788a1edba62faf4f6ee8438d87feafe39b374504561726fd7b9b5f5959d0d
7
+ data.tar.gz: d58627c8387a891814bf5a362a23035f9c58f2b5959fe3857afdec66cac7a2944601cfa03311c3791cc18038fd4a1c4faf5dd1793c54b9bbab1d2bd487e4b140
@@ -148,7 +148,19 @@ module GraphQL
148
148
  end
149
149
  elsif defined?(@resolver_class) && @resolver_class
150
150
  all_defns = {}
151
- all_defns.merge!(@resolver_class.own_field_arguments)
151
+ @resolver_class.all_field_argument_definitions.each do |arg_defn|
152
+ key = arg_defn.graphql_name
153
+ case (current_value = all_defns[key])
154
+ when nil
155
+ all_defns[key] = arg_defn
156
+ when Array
157
+ current_value << arg_defn
158
+ when GraphQL::Schema::Argument
159
+ all_defns[key] = [current_value, arg_defn]
160
+ else
161
+ raise "Invariant: Unexpected argument definition, #{current_value.class}: #{current_value.inspect}"
162
+ end
163
+ end
152
164
  all_defns.merge!(own_arguments)
153
165
  else
154
166
  all_defns = own_arguments
@@ -92,6 +92,10 @@ module GraphQL
92
92
  dummy.own_arguments
93
93
  end
94
94
 
95
+ def all_field_argument_definitions
96
+ dummy.all_argument_definitions
97
+ end
98
+
95
99
  # Also apply this argument to the input type:
96
100
  def argument(*args, own_argument: false, **kwargs, &block)
97
101
  it = input_type # make sure any inherited arguments are already added to it
@@ -216,8 +216,8 @@ module GraphQL
216
216
  get_argument(name, context)
217
217
  end
218
218
 
219
- def own_field_arguments
220
- own_arguments
219
+ def all_field_argument_definitions
220
+ all_argument_definitions
221
221
  end
222
222
 
223
223
  # Default `:resolve` set below.
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module GraphQL
3
- VERSION = "2.0.4"
3
+ VERSION = "2.0.5"
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.0.4
4
+ version: 2.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Mosolgo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-21 00:00:00.000000000 Z
11
+ date: 2022-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: benchmark-ips