Vladimir Guguiev Implementing GraphQL - Without a Backend
70k Videos TBs of Data per Day 2 * 10^9 Minutes of Videos Streamed per Year
Data Fetching Sucks
GET /cats/:id Returns a cat
RESTful API Movies Endpoint Categories Endpoint Users Endpoint Web App Native App
sort-of-REST API
https://goo.gl/TfLnRF
GitHub GraphQL API Explorer https://goo.gl/2nQbaK
Benefits for the Frontend
Co-location of a component and its data needs Data Query Presentation
Faster feature development
Smart GraphQL Clients (Apollo, Relay, etc) • Normalized client-side caching • Optimistic UI updates • Server-side rendering made easy • Auto-polling • Real-time subscriptions
GraphQL Adoption
Client-first GraphQL GraphQL Schema Web App REST API Gateway Server Browser
GraphQL Schema resolves data from existing REST API
Configure Apollo GraphQL to use “client-side” schema
Use GraphQL in components
Next Steps...
Moving GraphQL Schema to a standalone server GraphQL Schema Web App REST API Gateway Server Client Native App Mobile apps can start using GraphQL Same schema running on a NodeJS server
Replace REST API Gateway with GraphQL API GraphQL API Gateway Web App Microservice 1 Server Client Native App Microservice 2 Database
Gradual Adoption
Don’t be afraid to try
GraphQL on the Client - Example App - https://github.com/wzrdzl/client-side-graphql Amazing GraphQL Tutorials for Different Languages - https://www.howtographql.com/ GraphQL Specification - https://facebook.github.io/graphql/
Thank you Questions and comments @wzrdzl @wzrdzl tech.showmax.com @ShowmaxDevs

Implementing GraphQL - Without a Backend