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

GraphQL

 GraphQL

Internal Lightning Talk @ Redgate, Cambridge, UK

3a53a5136f530c121a196914aecf3936?s=128

Tugberk Ugurlu

September 05, 2017
Tweet

Transcript

  1. GraphQL TUGBERK UGURLU

  2. https://flic.kr/p/7ZJ5Aa

  3. GraphQL is a query language for your API, and a

    server-side runtime for executing queries by using a type system you define for your data. (http://graphql.org/learn/)
  4. WHAT PROBLEMS DOES IT ADDRESS? Strongly Typed Describe what’s possible

    with a type system Declarative Ask for what you need, get exactly that Compositional Get many resources in a single request
  5. WHO’S USING GRAPHQL? http://graphql.org/users/

  6. CHARACTERISTICS Query has exactly the same shape as the result

    GraphQL operates on set of types in your schema
  7. CHARACTERISTICS GraphQL services can be written in any language Introspection

    system allows you to ask for information about the schema
  8. SHOW ME THE CODE! https://flic.kr/p/ec78kF

  9. HELLO WORLD!

  10. HELLO WORLD!

  11. NULLABILITY http://graphql.org/learn/best-practices/#nullability

  12. HELLO WORLD!

  13. SERVER

  14. CLIENT

  15. GITHUB GRAPHQL API V4 https://developer.github.com/v4/

  16. GITHUB GRAPHQL API V4

  17. GITHUB GRAPHQL API V4

  18. GITHUB GRAPHQL API V4

  19. GRAPHIQL https://github.com/graphql/graphiql

  20. SILVER BULLET? https://flic.kr/p/5UBU5r

  21. A FEW PROBLEMS Authentication and Authorization You are on your

    own! HTTP Caching Cause by having a POST request with single endpoint Unpredictable Execution Freedom has its cost!
  22. MUTATIONS It seems immature and enforces the RPC pattern. (http://graphql.org/learn/queries/#mutations)

  23. BFF (BACKENDS FOR FRONTENDS) (http://samnewman.io/patterns/architectural/bff/)

  24. ODATA? https://twitter.com/tourismgeek/status/904983421352644608

  25. FURTHER RESOURCES https://flic.kr/p/4omoir

  26. RFC SPEC http://facebook.github.io/graphql/ (Working draft, last updated IN 2016, Oct)

  27. THINKING IN GRAPHS http://graphql.org/learn/thinking-in-graphs/

  28. RELAY https://facebook.github.io/relay/

  29. MORE LINKS • Home of GraphQL: http://graphql.org/ • Best Practices

    with GraphQL: http://graphql.org/learn/best-practices/ • Getting Started: http://graphql.org/graphql-js/ • Validation: http://graphql.org/learn/validation/ • Pagination: http://graphql.org/learn/pagination/