The document discusses GraphQL as an alternative to REST APIs. It begins by describing some common issues with REST APIs, such as over-fetching and under-fetching data. It then introduces GraphQL as a query language that allows clients to get precisely the data they need in a single request. Key benefits of GraphQL include no breaking changes, no over-fetching or under-fetching, and being transport agnostic. The document also covers GraphQL concepts like schemas, queries, mutations, and errors. It provides examples of how problems like rate limiting and error handling are approached differently in GraphQL compared to REST. In the end, it acknowledges that GraphQL has a learning curve but can help solve real problems for
17. But only for the web.
The app should be
clean.
Add
Comments
18. GET /posts
GET /posts/1/comments
GET /posts/2/comments
GET /posts/3/comments
GET /posts/4/comments
GET /posts/5/comments
...
Solution 1
Under-Fetching
• Slow
• Inconventient
73. Clients
• Different Clients
• Bandwidth-conscious
Data
• Many different resources
• Many fields
• Well connected
Image by Clker-Free-Vector-Images from Pixabay
75. THANKS!
Any questions?
You can find me at:
www.linkedin.com/in/EllaShar
Resources: SlidesCarnival, StartupStockPhotos, Unsplash, Pixabay, Rawpixel, PNGEgg.
76. • Modeling GraphQL Errors: 1, 2, 3
• Rate Limiting: 1, 2
• The Case Against GraphQL (Robert Zhu)
• Why GraphQL (Chris Arcand)
• AppSync (AWS), Kong, Tyk
Further Reading
Editor's Notes
What is GraphQL?
And why should we, or shouldn’t we, use it?
BREATHE, PAUSE!
But first, hi, I’m Ella Sharakanski, I’m a software developer at a startup called Salto, in Tel Aviv, and I use GraphQL every day, both in the BE and in the FE.
And there is my dog, Kinder.
But enough about me, let’s talk about you.
If you were Mark Zuckerberg. In 2003.
So, you’re developing Facebook. And specifically, the most important part of Facebook, which is of course the feed. CLICK
And
I have been a software developer for the last 6 years. Currently I’m working at Salto.
But enough about me, let’s talk about you. If you were Mark Zuckerberg. In 2003. So, you’re now designing Facebook’s feed. CLICK
And specifically, you are creating the API of Facebook.
Less color in the background!
A few months later you decide to hire a product manager, and he has a very innovative idea.
What if we don’t show comments!
A few months later you decide to hire a product manager, and he has a very innovative idea.
What if we don’t show comments!
A few months later you decide to hire a product manager, and he has a very innovative idea.
What if we don’t show comments!
Also, how to show the top likers of each comment?
Also, how to show the top likers of each comment?
Also, bandwidth, no schema…
Change title because people know it’s ready for production!
Change title because people know it’s ready for production!
Helps you avoid breaking your API
Solves over-fetching and under-fetching
Forces you to use a schema, which has many benefits
Reduces bandwidth usage
Learning-curve
Maturity
Flexibility
Also, bandwidth, no schema…
Also, bandwidth, no schema…
Template credit!
No numbers on the side
Remove the post resolver
introduce Kinder
Separate adv to slides
Special image for disadv