GraphQL brings joy to using APIs. Even though it's based on a type system, GraphQL in many ways is more flexible than REST.
Even though it's based on a type system, in many ways GraphQL is more flexible than REST.
But the flexibility that makes GraphQL a joy to work with can have its downsides if you aren't careful.
Schema design is an area where one small oversight at the beginning can get you stuck having to deal with weird naming, bloated duplicates, and other annoying workarounds.
It doesn't have to be like this!
Nik Graf has extensive experience designing GraphQL schemas, for a variety of business applications.
In this workshop, Nik has prepared several examples following different design patterns. Through exploration and comparison, you'll come away from this workshop with actionable knowledge for designing and extending schemas.
Follow Nik, and avoid making Schema mistakes that will come back to bite you later.
This live remote workshop will be held on November 11, 2019 at 10:30 am - 1:30 pm Pacific
Workshop Topics Include:
Naming conventions for fields, queries, mutations
GraphQL Aliases
Benefits of nullable fields and when to use them
Connection Specification and why you want to use it
Extending connections to attach relationship metadata
Extending connections to build pagination UI
Mutation Payload Design
Handling expected errors for Mutations
GraphQL RFCs e.g. Datetime, Union Input Types
yarn install # or npm install
yarn start
In index.js
you can change the imports to import the respective lesson.
Visit http://localhost:4000
to see GraphiQL.
For every lesson there is a folder. It includes a README.md with notes. Some of them contain an exercise at the end of the lesson.
Process for every lesson:
- Presentation by Nik
- Q&A
- Exercise (not every lesson has one)
- Break
- Setup
- Design Process
- Naming Fields
- Aliases and how they impact naming
- Nullable Fields
- Connections incl. Cursors
- Extending Connections
- Naming Queries
- Node Interface
- Mutation Payload
- Expected Errors in the Mutation Payload
- Naming and structuring Mutations
- Union Input RFC
- Datetime RFC