Using the createBook Mutation

Learn to use types generated by using GraphQL Code Generator with mutations in a React application to update data on a GraphQL server.

Generating types

To add the createBook mutation to our form, we import the gql function and use it at the top of our components/books/CreateForm.tsx file.

Get hands-on with 1200+ tech skills courses.