Skip to content

Commit a7034ba

Browse files
committed
Fixed examples
1 parent 7768d14 commit a7034ba

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

examples/starwars/schema.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Meta:
1616
interfaces = (relay.Node, )
1717

1818
@classmethod
19-
def get_node(cls, id, context, info):
19+
def get_node(cls, info, id):
2020
node = get_ship(id)
2121
return node
2222

@@ -34,7 +34,7 @@ class Meta:
3434
interfaces = (relay.Node, )
3535

3636
@classmethod
37-
def get_node(cls, id, context, info):
37+
def get_node(cls, info, id):
3838
return get_faction(id)
3939

4040

@@ -48,9 +48,7 @@ class Input:
4848
faction = graphene.Field(Faction)
4949

5050
@classmethod
51-
def mutate_and_get_payload(cls, input, context, info):
52-
ship_name = input.get('ship_name')
53-
faction_id = input.get('faction_id')
51+
def mutate_and_get_payload(cls, root, info, ship_name, faction_id, client_mutation_id=None):
5452
ship = create_ship(ship_name, faction_id)
5553
faction = get_faction(faction_id)
5654
return IntroduceShip(ship=ship, faction=faction)

0 commit comments

Comments
 (0)