Publicité

Introduction to graphQL

26 Jul 2019
Publicité

Contenu connexe

Publicité

Introduction to graphQL

  1. Introduction to GraphQL
  2. > REST & GraphQL > GraphQL Jargons > Demo with GitHub APIs > Tool Chains > Workshop - Exploring the world of Pokemons with GraphQL Agenda
  3. Sakthivel Viswanathan Senior Consultant, ThoughtWorks Speakers Introduction Muhil Varnan V Consultant, ThoughtWorks
  4. REST
  5. Challenges faced when working with REST?
  6. Over-fetching & Under-fetching
  7. > Rapid UI changes, when we scale and iterate our product > No documentation, API explorability and schema > No enforcement of specification > New endpoints for new features Other limitations?
  8. What is GraphQL? > Query language for the API > Server runtime > Specification > Declarative data fetching
  9. GraphQL History 2018 GraphQL Foundation, Hosted by Linux Foundation 2012 Internally used by facebook 2015 Publicly released
  10. Schema Scalar Types Int Integer Float Float String String Boolean Boolean ID ID Type Modifiers String Nullable string String! Required string [String] List of strings [String]! Required list of strings [String!]! Required list of required strings > Design or blueprint for our data. > Schema has the type information, queries, mutations etc.. devhints.io/graphql
  11. Schema Express the data you have in the form of Schema Query Denote the data you require
  12. > Request what we need > Response will match what we requested > No Over-fetch and No Under- fetch
  13. Root Types
  14. > A function implementing a GraphQL field > Flexible - Query API, Query Database or any other sources Resolvers
  15. REST GRAPHQL http http/websocket/TCP GET POST PUT PATCH DELETE Methods POST Methods Query Mutation Subscription Action Types GET
  16. Checkpoint > Limitations with REST > What is GraphQL? > Schema, Root Types, Resolvers
  17. Demo
  18. Github Thinking in Graphs
  19. What GraphQL is not? > Specific to React > Database technology > Supports only Javascript
  20. Caveats > Caching > Exposed to arbitrary requests > Monitoring
  21. Takeaways > Schema, Root Types, Resolver > Not a database technology
  22. Pokemons Exploring world of With GraphQL
  23. Don’t know what is pokemon?
  24. Pokemon Types Grass Electric Fire water
  25. Pokemon World
  26. Capturing a pokemon
  27. Apollo
  28. https://graphql.org/code/ GraphQL Implementations
Publicité