spec/support/star_wars_schema.rb in graphql-relay-0.5.1 vs spec/support/star_wars_schema.rb in graphql-relay-0.6.0
- old
+ new
@@ -5,10 +5,10 @@
# - global id creation & "decrypting"
# - a find-object-by-global ID field
# - an interface for Relay ObjectTypes to implement
# See global_node_identification.rb for the full API.
NodeIdentification = GraphQL::Relay::GlobalNodeIdentification.define do
- object_from_id -> (id) do
+ object_from_id -> (id, ctx) do
type_name, id = NodeIdentification.from_global_id(id)
STAR_WARS_DATA[type_name][id]
end
type_from_object -> (object) do