In this talk, we shared some of our highlights of the GraphQL Europe conference.
You can see the full coverage of the conference here: https://www.graph.cool/talks/
3. "REST is a set of architecture
constraints, not a protocol"
4. REST Architecture
Constraints
1. Client Server
2. Stateless
3. Cacheable
4. Layered System
5. Uniform Interface
A. Identification of resources
B. Manipulation of resources through representations
C. Self-descriptive messages
D. Hypermedia as the engine of application state
5. GraphQL ticks all the boxes
Client Server
Stateless
Cacheable
Layered System
Uniform Interface
A. Identification of resources
Manipulation of resources through representations
Self-descriptive messages
B. Hypermedia as the engine of application state
(nearly 😅)
13. Whitelisted Queries
• Server only accept known queries
• Use to restrict which queries can be made
• The idea here is more about security, less about
performance
14. Compiled Queries
• Do some optimisations in build step
• E.g. eliminating redundant fields
• optimised query gets sent to server
15. Persisted Queries
• Compile static queries and save on server
• only send the ID instead of the whole query string
• Supported by Apollo Client and Relay Modern
Query Store
GraphQL Server
#111
#110
id query
#110 …
… …
16. Schema-driven development
• Get representatives from frontend and backend in a
room
• Use GraphQL SDL as discussion basis
• Create and discuss schema together
• Then both parties go and write code according to
the schema
18. “The major problems of our work
are not so much technological as
sociological in nature”
- Peopleware
19. Permissions are handled
differently
• Facebook has permissions baked into the
underlying data layer, so GraphQL is agnostic of
permissions
• GitHub, Xing and Shopify have the logic in GraphQL
mostly out of legacy REST API code reasons
21. Why does GraphQL have a
spec?
• Describes the behaviour that we expect from all
implementations
• Enables implementations across languages
• Client interoperability
• Stable base
22. GraphQL Development
Philosophy
• backwards compatibility
• performance is a feature
• favour no change
• Prove it first
• slow and steady pace (new versions twice a year, fall
and spring)
23. GraphQL - Spring 2017
• new validation rules
• error key paths
• schema definition language
• subscriptions
27. Where to learn GraphQL
• http://graphql.org/learn
• https://www.graph.cool/talks/ (Find all talks there 👀)
• http://www.graphql.com/
• https://www.howtographql.com/