spec/support/star_wars/schema.rb in graphql-1.5.9 vs spec/support/star_wars/schema.rb in graphql-1.5.10
- old
+ new
@@ -181,10 +181,11 @@
input_field :factionId, !types.ID
# Result may have access to these fields:
return_field :shipEdge, Ship.edge_type
return_field :faction, Faction
+ return_field :aliasedFaction, Faction, property: :aliased_faction
# Here's the mutation operation:
resolve ->(root_obj, inputs, ctx) {
IntroduceShipFunction.new.call(root_obj, inputs, ctx)
}
@@ -214,10 +215,11 @@
connection_class = GraphQL::Relay::BaseConnection.connection_for_nodes(faction.ships)
ships_connection = connection_class.new(faction.ships, args)
ship_edge = GraphQL::Relay::Edge.new(ship, ships_connection)
result = {
shipEdge: ship_edge,
- faction: faction
+ faction: faction,
+ aliased_faction: faction,
}
if args["shipName"] == "Slave II"
LazyWrapper.new(result)
else
result