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

15 lines
342 B
Python

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