Skip to content

Commit 42b93b5

Browse files
committed
Fixed examples
1 parent 1d8f5de commit 42b93b5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

examples/starwars_relay/schema.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,19 @@ def get_node(cls, id, context, info):
1717
return get_ship(id)
1818

1919

20+
class ShipConnection(graphene.Connection):
21+
class Meta:
22+
node = Ship
23+
24+
2025
class Faction(graphene.ObjectType):
2126
'''A faction in the Star Wars saga'''
2227

2328
class Meta:
2429
interfaces = (relay.Node, )
2530

2631
name = graphene.String(description='The name of the faction.')
27-
ships = relay.ConnectionField(Ship, description='The ships used by the faction.')
32+
ships = ShipConnection.Field(description='The ships used by the faction.')
2833

2934
@resolve_only_args
3035
def resolve_ships(self, **args):

0 commit comments

Comments
 (0)