Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The rise of GraphQL

The rise of GraphQL

Since its introduction in 2015, GraphQL has become a very popular API. Often times replacing existing REST APIs as well. In this talk we’ll look at:

What GraphQL is
Why you should (not) use GraphQL
Some best practices for implementing a GraphQL spec
Potential downsides

3f4444967dfc7a5a2a71d24175d94c3c?s=128

Jelmer Snoeck

January 28, 2020
Tweet

Transcript

  1. The rise of GraphQL

  2. FIND ME github.com/jelmersnoeck twitter.com/jelmersnoeck Jelmer Snoeck ABOUT ME - Tech

    Lead at manifold.co - Gopher - Performance, reliability and scalability
  3. What is GraphQL?

  4. Quick history lesson - Created by Facebook in 2012 -

    Open Sourced in 2015 - GraphQL Foundation in 2018
  5. GraphQL is a query language for APIs and a runtime

    for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools. - graphql.org
  6. None
  7. Descriptive

  8. Models

  9. Queries

  10. Query Language

  11. None
  12. evelinag.com

  13. graphql.org/swapi-graphql

  14. None
  15. None
  16. Runtime

  17. “a runtime for fulfilling those queries”

  18. Resolvers

  19. None
  20. None
  21. None
  22. Why (not) use GraphQL?

  23. Query Language + Runtime

  24. None
  25. None
  26. None
  27. Ask for what you need

  28. None
  29. None
  30. /v1/people/cGVvcGxlOjE=?field_mask=name,gender

  31. None
  32. Versioning and deprecation

  33. None
  34. None
  35. Error Handling

  36. None
  37. Performance

  38. None
  39. Performance - Use dataloaders - Use GET requests (where possible)

    - Set complexity limits
  40. Best Practices

  41. Pagination

  42. Pagination - cursor based - pageInfo - pagination by default

  43. None
  44. None
  45. None
  46. Global Object Identification

  47. None
  48. None
  49. Input/output objects for mutations

  50. None
  51. Thanks! @jelmersnoeck manifold.co