skillbox/server/books/schema/interfaces/contentblock.py

15 lines
334 B
Python

import graphene
from graphene import relay
from api.graphene_wagtail import GenericStreamFieldType
class ContentBlockInterface(relay.Node):
title = graphene.String()
contents = GenericStreamFieldType()
type = graphene.String()
@staticmethod
def resolve_type(parent, info, **kwargs):
return parent.type