Viewing the deployed application

Learning the GraphQL language is a topic in and of itself. In this section, I'll show some queries and mutations using the Insomnia client on macOS. Insomnia is a client application that can be used to make standard REST API requests and also has a lovely GraphQL interface when working with GraphQL endpoints.

A simple query to get a list of cupping sessions, returning only the ID and name of the Sessions, looks like the following:

    query allSessions {       sessions {        id        name      }    }

When you think back to the implementation of the Query class, you might recall the following:

    class Query(graphene.ObjectType):      sessions = graphene.List(SessionObject, id=graphene.Int(),             account_id=graphene.Int())

Hopefully, things are ...

Get Serverless Design Patterns and Best Practices now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.