graphql 2.3.1 → 2.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/graphql/language/nodes.rb +1 -0
- data/lib/graphql/schema/argument.rb +17 -2
- data/lib/graphql/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 573ce6f5423ca2d9eb0ca3dab40f01869501f834c3b48d5cac7f7c06fbf36da9
|
4
|
+
data.tar.gz: c3b1f0393d2838a2478a36a43cec88560832c220a3896f2ee4c715d013d1758c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14d6c96c20c8fdb56ecddf0279e24e83c862d4133c72b3cebc44dca9e40e1c684b4f4a4c45fca81451d48d1bb97a4e6c3ae13499a40e12a76926e679a12a13f2
|
7
|
+
data.tar.gz: 44157aaa761da8c9f82afa9e31533ee3c87cdf4257256ec84f70f0e30dff8dc1830486c2ff02b4464a67e8815518466451ae598eabc12249cf2edaad6a9371f1
|
@@ -206,8 +206,8 @@ module GraphQL
|
|
206
206
|
# Used by the runtime.
|
207
207
|
# @api private
|
208
208
|
def prepare_value(obj, value, context: nil)
|
209
|
-
if
|
210
|
-
value = value
|
209
|
+
if type.unwrap.kind.input_object?
|
210
|
+
value = recursively_prepare_input_object(value, type)
|
211
211
|
end
|
212
212
|
|
213
213
|
Schema::Validator.validate!(validators, obj, context, value)
|
@@ -373,6 +373,21 @@ module GraphQL
|
|
373
373
|
|
374
374
|
private
|
375
375
|
|
376
|
+
def recursively_prepare_input_object(value, type)
|
377
|
+
if type.non_null?
|
378
|
+
type = type.of_type
|
379
|
+
end
|
380
|
+
|
381
|
+
if type.list? && !value.nil?
|
382
|
+
inner_type = type.of_type
|
383
|
+
value.map { |v| recursively_prepare_input_object(v, inner_type) }
|
384
|
+
elsif value.is_a?(GraphQL::Schema::InputObject)
|
385
|
+
value.prepare
|
386
|
+
else
|
387
|
+
value
|
388
|
+
end
|
389
|
+
end
|
390
|
+
|
376
391
|
def validate_input_type(input_type)
|
377
392
|
if input_type.is_a?(String) || input_type.is_a?(GraphQL::Schema::LateBoundType)
|
378
393
|
# Do nothing; assume this will be validated later
|
data/lib/graphql/version.rb
CHANGED
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.3.
|
4
|
+
version: 2.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Mosolgo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: base64
|