• What is GraphQL?
• Why GraphQL is useful?
• What is Apollo?
• Resources for getting started
• Query language for APIs developed by Facebook
• Alternative to REST
• Client-first approach
• Not framework-specific
• REST is Dead. ☠️
• JSONAPI is terrible
• GraphQL all the things!
• Provides a consistent standard for the server
• Predictable API for clients
• The server sets the standard
• All clients have to fall in line
Long, long ago web apps had a single server and single client.
It was a simpler time.
But now we have:
• multiple web apps
• a mobile-web specific app
• a native mobile app
And all of these clients
have different needs.
Making multiple requests to get a complete resource
Sending excess data to clients
Clients know too much about the API
This created some tension in the server-client relationship.
Server-side
• Schema to represent data relationships
• Only one API endpoint for all requests
• Resolvers to handle various request types
Client-side
• Request the specific data needed
• Request the shape of the data