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

How Canner.io Build GraphQL for CMS

wwwy3y3
June 21, 2018

How Canner.io Build GraphQL for CMS

Gave this speak at GraphQL Taiwan Meetup on 2018/6/20
How Canner.io Build GraphQL for CMS

wwwy3y3

June 21, 2018
Tweet

More Decks by wwwy3y3

Other Decks in Technology

Transcript

  1. Who am I • @wwwy3y3 • CTO & Co-founder @

    canner.io • React, Typescript, NodeJS, Docker, Terraform. • JSDC, COSCUP speaker
  2. ToC • Talk a little bit about CMS • Why

    we need GraphQL at Canner CMS • Why we develop apollo-link-firebase • How we develop GraphQL interface for canner.io
  3. How we see CMS • The Rise of BaaS. •

    Parse, Firebase, Graphcool…
  4. Apollo Client • Great support for React, Typescript • Great

    document • Create development experience (apollo-dev-tools) • Support Server-side Render • Opensource
  5. Apollo Client - Cache • apollo-cache-inmemory is the default cache

    implementation for Apollo Client • Cache by ID (id, or _id) & __typename, if not exist, fallback to Query path (ROOT_QUERY.allPeople.0)
  6. Apollo-link • A powerful way to compose actions around data

    handling with GraphQL • apollo-link-dedup: Deduplicate matching requests before making a request
  7. Apollo-link-firebase • A simple way to query Firebase in graphQL

    without building a graphQL server • https://github.com/Canner/apollo-link-firebase
  8. Apollo-link-firebase • Query: All sorting and filtering are supported. •

    Mutation: deal with set, update, remove methods with graphQL mutation. • Realtime Subscription: Listen to your Firebase events using graphQL Subscription. • Data Join: Retrieve your data from different paths using one graphQL.
  9. Canner GraphQL Interface • A GraphQL interface for View Layer

    • https://github.com/Canner/canner-graphql-interface
  10. Connect to Prisma • Problem • More strict GraphQL •

    Type transformation • Query/Mutation transformation
  11. Transformation • Canner Support Customized Scalars: • Image, File, Geopoint…

    could be Embed or JSON type • Query: remove fields if transformed to JSON type • Mutation: update payload based on type