Write a GraphQL Mutation using React Hooks with Urql
We look at how to use
useMutation from urql to run a GraphQL mutation query.
useMutation accepts a Graphql mutation as a string and passes the result and function to execute the query back in an array. This function can be called as many times as you like, passing variables the GraphQL query has defined.