graphql 1.10.9 → 1.10.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/graphql/execution/instrumentation.rb +1 -1
- data/lib/graphql/object_type.rb +1 -1
- data/lib/graphql/schema/field.rb +2 -0
- data/lib/graphql/schema/list.rb +2 -1
- data/lib/graphql/schema/loader.rb +3 -0
- data/lib/graphql/schema/warden.rb +7 -1
- data/lib/graphql/types/iso_8601_date.rb +1 -1
- data/lib/graphql/types/iso_8601_date_time.rb +3 -3
- 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: ec55133305287a9626164b06b4d87a97ee4d2b0fb75fb6c09c8964f34122c90f
|
4
|
+
data.tar.gz: 85dc4bae04dac609134141b4385414505bd6cf510259b1fadee7b50783eea0eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45c3d9d7db094887e1f3a95aa43ed58f58889e25039351c6767f0b3134cbb56ff479fcf8c5325b137a063e604b63e9a1edf942ad5c5b132989f706b473ad52d0
|
7
|
+
data.tar.gz: 8736c31c021fbaf119b3d2ed07a3d3b38ad22afa60070e6e5df62e16d2d8fe65314942a555500312bb40f8c37c7fb59755bf28dce144e707f2408d378c8d6d65
|
@@ -77,7 +77,7 @@ module GraphQL
|
|
77
77
|
end
|
78
78
|
|
79
79
|
def call_after_hooks(instrumenters, object, after_hook_name, ex)
|
80
|
-
instrumenters.
|
80
|
+
instrumenters.reverse_each do |instrumenter|
|
81
81
|
begin
|
82
82
|
instrumenter.public_send(after_hook_name, object)
|
83
83
|
rescue => e
|
data/lib/graphql/object_type.rb
CHANGED
@@ -88,7 +88,7 @@ module GraphQL
|
|
88
88
|
interfaces.each do |iface|
|
89
89
|
iface = BaseType.resolve_related_type(iface)
|
90
90
|
if iface.is_a?(GraphQL::InterfaceType)
|
91
|
-
type_memberships << iface.type_membership_class.new(iface, self, options)
|
91
|
+
type_memberships << iface.type_membership_class.new(iface, self, **options)
|
92
92
|
end
|
93
93
|
end
|
94
94
|
end
|
data/lib/graphql/schema/field.rb
CHANGED
data/lib/graphql/schema/list.rb
CHANGED
@@ -44,7 +44,8 @@ module GraphQL
|
|
44
44
|
if value.nil?
|
45
45
|
nil
|
46
46
|
else
|
47
|
-
ensure_array(value).map { |item| item.nil? ? item : of_type.coerce_input(item, ctx) }
|
47
|
+
coerced = ensure_array(value).map { |item| item.nil? ? item : of_type.coerce_input(item, ctx) }
|
48
|
+
ctx.schema.after_any_lazies(coerced, &:itself)
|
48
49
|
end
|
49
50
|
end
|
50
51
|
|
@@ -157,6 +157,7 @@ module GraphQL
|
|
157
157
|
type: type_resolver.call(field_hash["type"]),
|
158
158
|
description: field_hash["description"],
|
159
159
|
null: true,
|
160
|
+
camelize: false,
|
160
161
|
) do
|
161
162
|
if field_hash["args"].any?
|
162
163
|
loader.build_arguments(self, field_hash["args"], type_resolver)
|
@@ -171,6 +172,8 @@ module GraphQL
|
|
171
172
|
type: type_resolver.call(arg["type"]),
|
172
173
|
description: arg["description"],
|
173
174
|
required: false,
|
175
|
+
method_access: false,
|
176
|
+
camelize: false,
|
174
177
|
}
|
175
178
|
|
176
179
|
if arg["defaultValue"]
|
@@ -166,7 +166,13 @@ module GraphQL
|
|
166
166
|
end
|
167
167
|
|
168
168
|
def visible_field?(owner_type, field_defn)
|
169
|
-
visible
|
169
|
+
# This field is visible in its own right
|
170
|
+
visible?(field_defn) &&
|
171
|
+
# This field's return type is visible
|
172
|
+
visible_type?(field_defn.type.unwrap) &&
|
173
|
+
# This field is either defined on this object type,
|
174
|
+
# or the interface it's inherited from is also visible
|
175
|
+
((field_defn.respond_to?(:owner) && field_defn.owner == owner_type) || field_on_visible_interface?(field_defn, owner_type))
|
170
176
|
end
|
171
177
|
|
172
178
|
# We need this to tell whether a field was inherited by an interface
|
@@ -40,9 +40,9 @@ module GraphQL
|
|
40
40
|
when ::String
|
41
41
|
return DateTime.parse(value).iso8601(time_precision)
|
42
42
|
else
|
43
|
-
# In case some other API-compliant thing is given:
|
43
|
+
# In case some other API-compliant thing is given:
|
44
44
|
return value.iso8601(time_precision)
|
45
|
-
end
|
45
|
+
end
|
46
46
|
rescue StandardError => error
|
47
47
|
raise GraphQL::Error, "An incompatible object (#{value.class}) was given to #{self}. Make sure that only Dates, DateTimes, and well-formatted Strings are used with this type. (#{error.message})"
|
48
48
|
end
|
@@ -51,7 +51,7 @@ module GraphQL
|
|
51
51
|
# @return [DateTime]
|
52
52
|
def self.coerce_input(str_value, _ctx)
|
53
53
|
DateTime.iso8601(str_value)
|
54
|
-
rescue ArgumentError
|
54
|
+
rescue ArgumentError, TypeError
|
55
55
|
# Invalid input
|
56
56
|
nil
|
57
57
|
end
|
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: 1.10.
|
4
|
+
version: 1.10.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Mosolgo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: benchmark-ips
|