Max Panas (Web Developer @Agile Actors) and Stelios Charbalis (Software Engineer @Agile Actors) present GraphQL and how it compares to traditional REST API design at GreeceJS Meetup #14 (Athens, June 15, 2016).
16. }, {
HOW GRAPHQL
WORKS
User-Deᴀ各ned type system - "schema"
Data Universe is deᴀ各ned and connected on the server
Multiple Back-end services exposed through a single
controlled API
The client requests for exactly what it wants
20. GraphQL is not bound by any client framework
Ways of using it on the client
Relay (Speciᴀ各cally for React)
Lokka (Simplest lib, can be used with anything)
Others (Apollo, XHR, etc.)
Queries can easily be broken apart andmerged together
again
Declare exactly what your data requirements are on the
component layer
THE CLIENT STORY
21. GraphQL is a speciᴀ各cation of a communication protocol, not a storage
system, not a library
GraphQL is not tied to a speciᴀ各c language or framework
GraphQL does not allow clients to arbitrarily query your database(s)
GraphQL does not require a speciᴀ各c backend storage system
Security: Authentication is handled the same way as in REST
POSSIBLE MISCONCEPTIONS
22. Handling Resource intensive Queries on the Backend
- facebook/Dataloader
Handling errors in resolvers
- khadira/graphql-errors
Granular Control on querying
- @defer, @async, @stream
Live Queries
- Subscriptions
PRACTICAL PROBLEMS
23. GraphQL Introduction
GraphQL
Learn GraphQL
Zero to GraphQL in 30 Minutes – Steven Luscher
From REST to GraphQL
Validation and User Errors in GraphQL Mutations
Presentation built with Spectacle
USEFUL LINKS