This API language appeared in the community in 2015 (big thanks to Facebook developers!) and quickly became an interesting alternative to REST or x-rpc.
GraphQL has several advantages:
Strongly-typed. This permits a robust API contract between Swan and its consumers. Clients can easily generate the code that will allow them to consume our API, and can easily test that their integration went smoothly (aka. Contract testing).
Resilience. By giving power back to API clients, GraphQL has created a new class of APIs that is especially resilient to evolution.
Finer command. This remarkable request capacity gives API clients much finer command over the data they wish to fetch or over the way they wish to batch their requests. The freedom Swan's clients have to consume APIs will also be a fantastic opportunity to analyze client behaviour and thus better respond to their needs.
The Introspection System. This system allows us to ask our server about which queries the API supports. A new developer can easily refer to it as built-in documentation. Having rendered the GraphQL language very introspective from the beginning, its creators helped create a powerful community. Apollo and The Guild come to mind.
Future-oriented. Ultimately, GraphQL is forward-thinking. In the Golden Age of APIs, when everything seems to come from APIs, GraphQL lets us create meta-graphs consolidating multiple different suppliers (ex. onegraph.com).
With a stable and sustainable future, we are convinced GraphQL is the future of APIs.
New to GraphQL? Before digging into our documentation, we suggest you take a moment to acquaint yourself with GraphQLs basic concepts. You will find a short and sweet intro right here, and if you wish to go deeper, there are many fantastic resources: