Understanding GraphQL
As you saw in Chapter 10, Exposing Data via the Web Using OData, OData is a possible choice for combining data from different stores and exposing it via a common protocol like HTTP. OData also has a built-in query language for the client to control what data they want returned. But OData has a rather old-fashioned approach and is tied to the HTTP standard, for example, using query strings in an HTTP request.
If you would prefer to use a more modern and flexible technology for combining and exposing your data as a service, then a good alternative is GraphQL.
Like OData, GraphQL is a standard for describing your data and then querying it that gives the client control over exactly what they need. It was developed internally by Facebook in 2012 before being open sourced in 2015, and is now managed by the GraphQL Foundation.
Some of the key benefits of GraphQL over OData are:
- GraphQL does not require HTTP because it is transport-agnostic, so...