More creations to inspire you
FALL ZINE 2018
Presentation
MASTER'S THESIS ENGLISH
Presentation
49ERS GOLD RUSH PRESENTATION
Presentation
3 TIPS FOR AN INTERACTIVE PRESENTATION
Presentation
BRANCHES OF U.S. GOVERNMENT
Presentation
QUOTE OF THE WEEK ACTIVITY - 10 WEEKS
Presentation
RACISM AND HEALTHCARE
Presentation
Transcript
Index
1. The Story
2. What is GraphQL ?
3. What GraphQL is not?
4. Advantages
5. Limitations
6. GraphQL VS REST
7. Stop talking, demo time
1
2011
2012
But what was the problem to solve ?
Under fetching
Over fetching
π±
It's not
Environment
idea was
Born !
Feb 2012
August 2012
2015
Which of these statements is true?
- GraphQL is a database technology
- GraphQL can only be used together with SQL
- GraphQL was invented by Facebook
- GraphQL was developed by Netflix and Coursera
Which of these statements is true?
- GraphQL is a database technology
- GraphQL can only be used together with SQL
- GraphQL was invented by Facebook
- GraphQL was developed by Netflix and Coursera
Unlock the next chapter
π
β
2
" A query language for your API "
" GraphQL makes it easier for app developers to get the data they need without needing to know which sources itβs coming from "
" GraphQL is a syntax that describes how to ask for data "
" Allows to query deeply nested associations "
- Query
- Mutation
- Subscription
Operations Type
What are GraphQL subscriptions used for?
- Event-based realtime functionality
- Schema-based realtime functionality
- You use them to subscribe to the GraphQL Weekly newsletter
- They combine Queries and Mutations and allow you to read and write data
Unlock the next chapter
π
What are GraphQL subscriptions used for?
- Event-based realtime functionality
- Schema-based realtime functionality
- You use them to subscribe to the GraphQL Weekly newsletter
- They combine Queries and Mutations and allow you to read and write data
β
3
GraphQL Misconceptions
Graphql ?
4
performance
1
Under fetching
Ask for what you need,
Language agnostic
2
plenty of client and server libraries are available
Documentation
3
Introspection
- Learn about the available fields and types of a GraphQL schema
- Documentation is automatically generated
and always up-to-date
Strongly Typed
4
Robust static types
- Code is predictable
- Earlier detection of errors and speeds development
- The response in a simple, secure, and predictable shape
Developer Experience
5
Flexibility & Evolution
- Add new fields and types to GraphQL API without breaking changes ( incremental )
- Developers donβt have to maintain multiple versions of the API
- Single source of truth
6
Community
Powerful developer tools
π§°
Widespread adoption
Widespread adoption
5
Pain points
- Lack of resources on the backend part ( Java )
- A single endpoint make caching complicated => should use tools
- Learning curve
- Move complexity to backend (Query Complexity)
6
But wait !
what is REST?
- A client-server architecture
- Stateless operations such as POST, PUT, DELETE, GET, ...
- Caching Mechanism (using the same URL )
- Easily Scalable
What is GraphQL Good for?
What is REST Good for?
- Error Reporting and Monitoring
( graphql return 200 OK status )
- Caching
- Security
- Performance
- Better DX
- A humain-readable query
- Single endpoint
- get exactly what you need !
- Evolution
π
Key Differences
Which is Better ? GraphQL will Replace REST ?
7
Wrapping Up
8
What's an API ?
Client
Kitchen
Waiter
Application
API
Server
To summarize
- Graphql is solving many problems
- Graphql has some drawbacks that shouldn't be ignored
- Avoid "Hype Driven Development"
What's next ?
9
if we do it, we know it
- Graphql tutorial
- Official website introduction:
- talk about REST VS Graphql
- Lessons from 4 Years of GraphQL
https://www.youtube.com/watch?v=yLf0rIaRtRc
https://www.youtube.com/watch?v=zVNrqo9XGOs&t=2s
Thanks!