INNER CODE UNIT · Python
BookAPI
phalt/django-api-domains · example_domain/apis.py:14
class BookAPI:
@staticmethod
def get(*, book_id: uuid.UUID) -> Dict:
logger.info('method "get" called')
return BookService.get_book(id=book_id)
# graphQL Entity
class BookEntity(ObjectType):
class Meta:
interfaces = (relay.Node,)
name = graphene.String()
author_name = graphene.String()
# graphQL mutation
class CreateBook(relay.ClientIDMutation):