INNER CODE UNIT · Python

get

phalt/django-api-domains · example_domain/apis.py:17

    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):
    class Input:
        book_name = graphene.String(required=True)
        author_id = graphene.ID(required=True)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…