Skip to content

Commit 4127031

Browse files
committed
Fixed starwars schema
1 parent 5cba3f6 commit 4127031

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

examples/starwars/schema.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import graphene
22
from graphene import Schema, relay, resolve_only_args
3-
from graphene_django import DjangoObjectType
3+
from graphene_django import DjangoObjectType, DjangoConnectionField
44

55
from .data import (create_ship, get_empire, get_faction, get_rebels, get_ship,
66
get_ships)
@@ -18,7 +18,6 @@ class Meta:
1818
@classmethod
1919
def get_node(cls, id, context, info):
2020
node = get_ship(id)
21-
print(node)
2221
return node
2322

2423

@@ -61,7 +60,7 @@ class Query(graphene.ObjectType):
6160
rebels = graphene.Field(Faction)
6261
empire = graphene.Field(Faction)
6362
node = relay.Node.Field()
64-
ships = relay.ConnectionField(Ship, description='All the ships.')
63+
ships = DjangoConnectionField(Ship, description='All the ships.')
6564

6665
@resolve_only_args
6766
def resolve_ships(self):

0 commit comments

Comments
 (0)