chapter eight
This chapter covers:
- Implementing GraphQL’s mutation fields
- Sharing payload and input types between mutations
- Authenticating users for mutation and query operations
- Creating custom, user-friendly error messages
- Using powerful database features to optimize mutations
- Using dependency injection between related mutation operations
- Using custom values in ENUM types
We’ve implemented most of the "query" tree for the AZdev GraphQL API in Chapter 8. It’s now time to implement the mutation operations we planned. Starting with the userCreate mutation to enable AZdev users to create an account and use other mutations (and queries) that require authenticated requests.
Since this is the very first mutation we’re creating, we need to do some groundwork to wire things up for all mutations. We basically need to first make the schema ready to host mutations.
Current code: git checkout 8.0
(If you need to discard local changes: git reset --hard && git clean -fd)