13 lines
322 B
Python
13 lines
322 B
Python
import graphene
|
|
from graphene import relay
|
|
|
|
|
|
class ModuleInterface(relay.Node):
|
|
pk = graphene.Int()
|
|
hero_image = graphene.Field('books.schema.nodes.WagtailImageNode')
|
|
topic = graphene.Field('books.schema.nodes.TopicNode')
|
|
|
|
@staticmethod
|
|
def resolve_pk(parent, info, **kwargs):
|
|
return parent.id
|