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

Wingchi Wong: Apollo and GraphQL and React, Oh My!

Avatar for Luke Heath Luke Heath
February 21, 2019

Wingchi Wong: Apollo and GraphQL and React, Oh My!

Avatar for Luke Heath

Luke Heath

February 21, 2019

More Decks by Luke Heath

Other Decks in Programming

Transcript

  1. WHAT GRAPHQL IS NOT GRAPHQL IS ▸ Not a Database

    ▸ Not a Protocol (e.g. — HTTP, WebSocket, TCP) ▸ Not a Frontend/Backend framework
  2. WHAT GRAPHQL IS NOT GRAPHQL ▸ Is a query language

    for fulfilling APIs ▸ Gives the client the ability to ask for the data it needs image source: https://blog.apollographql.com/the-graphql-stack-how-everything-fits-together-35f8bf34f841
  3. WHAT IS APOLLO APOLLO IS ▸ A frontend and backend

    framework for GraphQL ▸ A frontend framework that handles GraphQL queries, mutations, and subscriptions ▸ A frontend framework that caches results from queries in a local normalized database
  4. RETROSPECTIVE GRAPHQL IS GREAT! ▸ GraphQL allows us to quickly

    make changes to our data needs on the client-side ▸ GraphiQL (https://github.com/graphql/graphiql) is extremely useful
  5. RETROSPECTIVE DEFAULT CACHING WILL INFER DATA RELATIONSHIPS ▸ By default

    the Apollo cache will try to normalize your data in the order it gets it. This can lead to incorrect data relationships in your cache.