graphql-decorate 1.0.3 → 1.0.4
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.
- checksums.yaml +4 -4
- data/lib/graphql/decorate/undecorated_field.rb +10 -1
- data/lib/graphql/decorate/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: b79924fe9758b0881143f50e7536b02958a88932be59b541545f56ab62fc2571
|
|
4
|
+
data.tar.gz: c2455d37d70dc7ff45d1fbe4eab2ae304437ad4c04d0f0cb4ef5912447c68308
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fa468e9077d6854f198045c2ad8ebc47bb07c9c63cc2e14d52b3f65693fe12c9dc2466787740c76c92ea98e4617b0c42cc39c72672f3c5dbc777291a259f66e2
|
|
7
|
+
data.tar.gz: 7372025f4fd3857dff61b875f9da3883030f5f1b43f406a985d76f74ca72c548d2df3cabf915a7979eecc8f66b8a8330849d1b7f1df43405fa4aba575185bc39
|
|
@@ -105,10 +105,19 @@ module GraphQL
|
|
|
105
105
|
GraphQL::Decorate::TypeAttributes.new(type.resolve_type(value,
|
|
106
106
|
graphql_context))
|
|
107
107
|
else
|
|
108
|
-
|
|
108
|
+
resolve_type_attributes_from_schema
|
|
109
109
|
end
|
|
110
110
|
end
|
|
111
111
|
end
|
|
112
|
+
|
|
113
|
+
def resolve_type_attributes_from_schema
|
|
114
|
+
result = graphql_context.schema.resolve_type(type, value, graphql_context)
|
|
115
|
+
return result unless result.is_a?(Array) && result.size == 2
|
|
116
|
+
|
|
117
|
+
result[0]
|
|
118
|
+
.authorized_new(result[1], graphql_context)
|
|
119
|
+
.then(&GraphQL::Decorate::TypeAttributes.method(:new))
|
|
120
|
+
end
|
|
112
121
|
end
|
|
113
122
|
end
|
|
114
123
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: graphql-decorate
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ben Brook
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-08-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: graphql
|