Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Implementing GraphQL - Without a Backend

143 views

Published on

GraphQL is getting more and more popular for developing web services. The traditional approach is to upgrade your backend service and then connect your frontend to it. We did it the other way around, starting with frontend and adding the backend later. This talk is about why and how we did it, so you can do it too.

Published in: Software
  • Login to see the comments

Implementing GraphQL - Without a Backend

  1. 1. Vladimir Guguiev Implementing GraphQL - Without a Backend
  2. 2. 70k Videos TBs of Data per Day 2 * 10^9 Minutes of Videos Streamed per Year
  3. 3. Data Fetching Sucks
  4. 4. GET /cats/:id Returns a cat
  5. 5. RESTful API Movies Endpoint Categories Endpoint Users Endpoint Web App Native App
  6. 6. sort-of-REST API
  7. 7. https://goo.gl/TfLnRF
  8. 8. GitHub GraphQL API Explorer https://goo.gl/2nQbaK
  9. 9. Benefits for the Frontend
  10. 10. Co-location of a component and its data needs Data Query Presentation
  11. 11. Faster feature development
  12. 12. Smart GraphQL Clients (Apollo, Relay, etc) • Normalized client-side caching • Optimistic UI updates • Server-side rendering made easy • Auto-polling • Real-time subscriptions
  13. 13. GraphQL Adoption
  14. 14. Client-first GraphQL GraphQL Schema Web App REST API Gateway Server Browser
  15. 15. GraphQL Schema resolves data from existing REST API
  16. 16. Configure Apollo GraphQL to use “client-side” schema
  17. 17. Use GraphQL in components
  18. 18. Next Steps...
  19. 19. 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
  20. 20. Replace REST API Gateway with GraphQL API GraphQL API Gateway Web App Microservice 1 Server Client Native App Microservice 2 Database
  21. 21. Gradual Adoption
  22. 22. Don’t be afraid to try
  23. 23. 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/
  24. 24. Thank you Questions and comments @wzrdzl @wzrdzl tech.showmax.com @ShowmaxDevs

×