graphql 1.13.17 → 1.13.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of graphql might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/graphql/schema/field.rb +7 -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: 06b422e884c0286eca2020124a83dbc02a1ac4dbf905b48f9d125fb4c2569eff
|
4
|
+
data.tar.gz: a4985d6e8e3cd0358f3afac1bd1d8023e24d4ed63e2be8f05557ec2822e69447
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7f61649fd57f66798a84eb713058add79cdff52bb49ad7dfbdaa328111d0288fc5154b2ee991ddbd77914fb80e9d0bced518ffdc21d92f801ab1b68bbf4add2
|
7
|
+
data.tar.gz: abb11a3b18e52544af8726152fab0f145e214f88521121ac775ba2e0fb0e0f22c9988406548cfde267df314ca58063a4d4130d29f53b236170312e0b806c28d0
|
data/lib/graphql/schema/field.rb
CHANGED
@@ -258,6 +258,10 @@ module GraphQL
|
|
258
258
|
# TODO: I think non-string/symbol hash keys are wrongly normalized (eg `1` will not work)
|
259
259
|
method_name = method || hash_key || name_s
|
260
260
|
@dig_keys = dig
|
261
|
+
if hash_key
|
262
|
+
@hash_key = hash_key
|
263
|
+
end
|
264
|
+
|
261
265
|
resolver_method ||= name_s.to_sym
|
262
266
|
|
263
267
|
@method_str = -method_name.to_s
|
@@ -822,7 +826,7 @@ module GraphQL
|
|
822
826
|
# Find a way to resolve this field, checking:
|
823
827
|
#
|
824
828
|
# - A method on the type instance;
|
825
|
-
# - Hash keys, if the wrapped object is a hash
|
829
|
+
# - Hash keys, if the wrapped object is a hash or responds to `#[]`
|
826
830
|
# - A method on the wrapped object;
|
827
831
|
# - Or, raise not implemented.
|
828
832
|
#
|
@@ -844,6 +848,8 @@ module GraphQL
|
|
844
848
|
else
|
845
849
|
inner_object[@method_str]
|
846
850
|
end
|
851
|
+
elsif defined?(@hash_key) && obj.object.respond_to?(:[])
|
852
|
+
obj.object[@hash_key]
|
847
853
|
elsif obj.object.respond_to?(@method_sym)
|
848
854
|
method_to_call = @method_sym
|
849
855
|
method_receiver = obj.object
|
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.13.
|
4
|
+
version: 1.13.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Mosolgo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: benchmark-ips
|