Core architectural patterns of GraphQL
In this section, we will discuss the various architectural patterns that are used for GraphQL. These patterns are independent of the technology used to implement it or the platform where it is deployed and executed. There are five different GraphQL patterns, as follows:
- DaaS pattern: Here, GraphQL server is used to expose the database layer. It can expose three operations – queries, mutations, and subscriptions (please refer to the Operation types section of this chapter). Using these operations, it can achieve Create, Read, Update and Delete (CRUD) operations like REST but also supports subscriptions on top of it. The following diagram shows this pattern:
Figure 10.6 – DaaS pattern
As we can see, GraphQL exposes its queries and operations using the HTTP protocol. GraphQL provides server libraries in multiple languages, using which teams can build and run GraphQL Server applications. Also, GraphQL...