graphql-relay 0.5.1 → 0.6.0
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81585136098af15f81a346878783f89731f2b623
|
4
|
+
data.tar.gz: 1dc5293103fcde26d25f627225e7e35a69c34d00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae47210e0b77604da888d6d9999dbb930f3eb146a8045304dc12d4d494cd9544877abe1702d4baa442856d079497654d246274bfb370251ddeac527daa9f4864
|
7
|
+
data.tar.gz: dc31f60ea115c6de5092baa4ddcc0f9594dd961d44f9a5c6ff112b04b25cf2ddb51d7ccfa6be244af26f8de796436db10607d473674edbd91861348030ef7b2c
|
@@ -51,7 +51,7 @@ module GraphQL
|
|
51
51
|
type(ident.interface)
|
52
52
|
argument :id, !types.ID
|
53
53
|
resolve -> (obj, args, ctx) {
|
54
|
-
ident.object_from_id(args[:id])
|
54
|
+
ident.object_from_id(args[:id], ctx)
|
55
55
|
}
|
56
56
|
end
|
57
57
|
end
|
@@ -85,8 +85,8 @@ module GraphQL
|
|
85
85
|
|
86
86
|
# Use the provided config to
|
87
87
|
# get an object from a UUID
|
88
|
-
def object_from_id(id)
|
89
|
-
@object_from_id_proc.call(id)
|
88
|
+
def object_from_id(id, ctx)
|
89
|
+
@object_from_id_proc.call(id, ctx)
|
90
90
|
end
|
91
91
|
end
|
92
92
|
end
|
@@ -7,7 +7,7 @@
|
|
7
7
|
# - an interface for Relay ObjectTypes to implement
|
8
8
|
# See global_node_identification.rb for the full API.
|
9
9
|
NodeIdentification = GraphQL::Relay::GlobalNodeIdentification.define do
|
10
|
-
object_from_id -> (id) do
|
10
|
+
object_from_id -> (id, ctx) do
|
11
11
|
type_name, id = NodeIdentification.from_global_id(id)
|
12
12
|
STAR_WARS_DATA[type_name][id]
|
13
13
|
end
|