v0.2 - last updated October 2020
If you want to read why GraphQL is part of the SJGAR stack read the Introducing the SJGAR stack post.
Publicly released as open source in 2015, GraphQL is making a significant impact on how systems are connected in the modern world. One of the uses is serving as a Backend-For-Frontend for modern web and mobile apps. The rich community and tool set with for instance Apollo server and client are giving companies a great chance to get a head start when dealing with state management and server client communication. Because the libraries do the heavy lifting, engineers can focus on creating apps with a stellar user experience and performance.
GraphQL APIs can be seen as maturity level 0 REST API. In a nutshell this means that the APIs use JSON that is served over HTTP. It also adds the concept of resources. Instead of creating a separate endpoint for every resource, GraphQL APIs expose a single endpoint to access the different resources.
A GraphQL endpoint exposes three top level fields:
- Queries; for retrieving data
- Mutations; for changing data
- Subscriptions: for listening to data changes.
The query and mutation offer similar functionality as the CRUD operations REST APIs have. Queries map to GET requests. Mutations handle things like POST, PUT, PATCH and DELETE methods.
Paragraph to be written
Paragraph to be written
Paragraph to be written
Paragraph to be written
Paragraph to be written
Paragraph to be written
Paragraph to be written
Paragraph to be written
- https://graphql.org/
- REST APIs Richardson Maturity Model - read on martinfowler.com