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

GraphQL Without Hype

GraphQL Without Hype

33d8f6c5f5c8b940ff4d6422a5f32b02?s=128

Łukasz Szymański

April 03, 2017
Tweet

Transcript

  1. GraphQL WITHOUT HYPE szymanskilukasz

  2. szymanskilukasz REST

  3. szymanskilukasz

  4. szymanskilukasz

  5. szymanskilukasz

  6. szymanskilukasz

  7. szymanskilukasz Multiple round trips between the client and server to

    render single views
  8. szymanskilukasz

  9. szymanskilukasz

  10. szymanskilukasz

  11. szymanskilukasz Ad Hoc Endpoints

  12. szymanskilukasz

  13. szymanskilukasz

  14. szymanskilukasz

  15. szymanskilukasz Maintaining Versions

  16. szymanskilukasz Weakly Typed

  17. szymanskilukasz Over Fetching Data

  18. szymanskilukasz Documentation ?

  19. szymanskilukasz What is GraphQL?

  20. szymanskilukasz GraphQL is a query language for APIs and a

    runtime for fulfilling those queries with your existing data
  21. szymanskilukasz No round trips

  22. szymanskilukasz For clients

  23. szymanskilukasz Backend ?

  24. szymanskilukasz It can be anything

  25. szymanskilukasz It can be anything

  26. szymanskilukasz How ? 'resolve' => function ($rootValue, $args, $context) {

    // return something from your existing backend; }
  27. szymanskilukasz Thanks to resolve() we can put GraphQL anywhere

  28. szymanskilukasz API for mobile apps

  29. szymanskilukasz Internal API

  30. szymanskilukasz API for services

  31. szymanskilukasz No Versioning https://github.com/facebook/graphql/issues/175

  32. szymanskilukasz Facebook's GraphQL schema

  33. szymanskilukasz Facebook's GraphQL schema - over 4 years old

  34. szymanskilukasz Facebook's GraphQL schema - over 4 years old -

    1,000s of types at this point
  35. szymanskilukasz Facebook's GraphQL schema - over 4 years old -

    1,000s of types at this point, - under active change by 100s of engineers
  36. szymanskilukasz Facebook's GraphQL schema - over 4 years old -

    1,000s of types at this point, - under active change by 100s of engineers - has never needed a versioned breaking change
  37. szymanskilukasz Facebook's GraphQL schema - over 4 years old -

    1,000s of types at this point, - under active change by 100s of engineers - has never needed a versioned breaking change - and still supports 4-year old shipped versions of iOS and Android apps (which unfortunately are still being used)
  38. szymanskilukasz Strongly Typed / Documentation

  39. szymanskilukasz Confession

  40. szymanskilukasz Be prepared

  41. szymanskilukasz Denial of Service

  42. szymanskilukasz

  43. szymanskilukasz

  44. szymanskilukasz Authentication Authorization

  45. szymanskilukasz N+1 queries

  46. szymanskilukasz Monitoring / Debugging Tools

  47. szymanskilukasz How to get started

  48. szymanskilukasz Internal API for services

  49. szymanskilukasz Demo: echo(message: “”)

  50. Demo: echo(message: “”)

  51. szymanskilukasz Demo: get User Credits

  52. szymanskilukasz Demo: get User Credits

  53. szymanskilukasz Demo: Deprecated Fields

  54. szymanskilukasz Demo: Deprecated Fields

  55. szymanskilukasz Demo: Mutations

  56. szymanskilukasz Demo: Mutations

  57. szymanskilukasz Public API

  58. szymanskilukasz Demo: User Authorization

  59. szymanskilukasz Demo: User Authorization

  60. szymanskilukasz Demo: Performance

  61. szymanskilukasz Demo: Performance

  62. szymanskilukasz I just want to have fun

  63. http://graphql.org/swapi-graphql/ szymanskilukasz

  64. https://developer.github.com/early-access/graphql/explorer/ szymanskilukasz

  65. https://github.com/chentsulin/awesome-graphql szymanskilukasz

  66. Łukasz Szymański Development Team Lead at @szymanskilukasz https://www.linkedin.com/in/szymanskilukasz https://twitter.com/szymanskilukasz https://speakerdeck.com/szymanskilukasz

    szymanskilukasz