O'Reilly logo

Serverless Design Patterns and Best Practices by Brian Zambrano

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required