graphql 2.0.1 → 2.0.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/analysis/ast/max_query_complexity.rb +0 -1
- data/lib/graphql/schema/argument.rb +4 -1
- data/lib/graphql/schema/field.rb +3 -1
- data/lib/graphql/schema/member/has_interfaces.rb +1 -1
- data/lib/graphql/schema/object.rb +8 -3
- data/lib/graphql/schema/resolver/has_payload_type.rb +11 -1
- 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: 445a61081bd654dbd59e1d6472e027958f8f88bcb5b3f32351921c5f24f7c572
|
4
|
+
data.tar.gz: d33ff0a628621fe4ccb4e19fbf727ce1e2cffe950697b33bc3682420bb6d2a81
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d2f6f4c7556db47fec205db4007958f397e8a6b25c40a1838cf0789bf5e71162b0fe62305cb703ec5d5e61371513e978e9544a2f8622787c488d1fbad547af2
|
7
|
+
data.tar.gz: c477b6a6c782e0bd5ef1eec47fc5dc6fa4ff56d21352c4ee1f6783debd8506c52cf6eace82c639166033b02436d4eebf5a18116624ad7ffd62d19ed8c5735dc0
|
data/lib/graphql/schema/field.rb
CHANGED
@@ -98,9 +98,14 @@ module GraphQL
|
|
98
98
|
class << self
|
99
99
|
# Set up a type-specific invalid null error to use when this object's non-null fields wrongly return `nil`.
|
100
100
|
# It should help with debugging and bug tracker integrations.
|
101
|
-
def
|
102
|
-
|
103
|
-
|
101
|
+
def const_missing(name)
|
102
|
+
if name == :InvalidNullError
|
103
|
+
custom_err_class = GraphQL::InvalidNullError.subclass_for(self)
|
104
|
+
const_set(:InvalidNullError, custom_err_class)
|
105
|
+
custom_err_class
|
106
|
+
else
|
107
|
+
super
|
108
|
+
end
|
104
109
|
end
|
105
110
|
|
106
111
|
def kind
|
@@ -20,7 +20,17 @@ module GraphQL
|
|
20
20
|
@payload_type ||= generate_payload_type
|
21
21
|
end
|
22
22
|
|
23
|
-
|
23
|
+
def type(new_type = nil, null: nil)
|
24
|
+
if new_type
|
25
|
+
payload_type(new_type)
|
26
|
+
if !null.nil?
|
27
|
+
self.null(null)
|
28
|
+
end
|
29
|
+
else
|
30
|
+
super()
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
24
34
|
alias :type_expr :payload_type
|
25
35
|
|
26
36
|
def field_class(new_class = nil)
|
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.0.
|
4
|
+
version: 2.0.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: 2022-
|
11
|
+
date: 2022-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: benchmark-ips
|