Since its introduction in 2015, GraphQL has become a very popular API. Often times replacing existing REST APIs as well. In this talk we’ll look at:
What GraphQL is
Why you should (not) use GraphQL
Some best practices for implementing a GraphQL spec
The rise of GraphQL
- Tech Lead at manifold.co
- Performance, reliability
What is GraphQL?
Quick history lesson
- Created by Facebook in 2012
- Open Sourced in 2015
- GraphQL Foundation in 2018
GraphQL is a query language for APIs and a runtime
for fulfilling those queries with your existing data.
GraphQL provides a complete and understandable
description of the data in your API, gives clients the
power to ask for exactly what they need and nothing
more, makes it easier to evolve APIs over time, and
enables powerful developer tools.
“a runtime for fulfilling those queries”
Why (not) use GraphQL?
Query Language + Runtime
Ask for what you need
Versioning and deprecation
- Use dataloaders
- Use GET requests (where possible)
- Set complexity limits
- cursor based
- pagination by default
Global Object Identification
Input/output objects for mutations