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

Implementing GraphQL queries

With the boilerplate out of the way, it's time to focus on our actual GraphQL implementation. Many software layers that powered the REST API will also power the GraphQL API, specifically the model/validation layer and persistence/SQLAlchemy layer.

If you are new to GraphQL, know there are two types of operations, which GraphQL treats differently and which require slightly different code, at least when using Python and Graphene. Those two actions are queries and mutations, or reads and writes, respectively. In this section, we will cover queries. This code provides all of the functionality for every query interaction in our example API. Details of each part of this code will be discussed in later. The main entry ...

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