import { useMutation } from '@apollo/client';
const [createAPIToken] = useMutation(GRAPHQL_MUTATION, {
variables: {
//
},
onCompleted: (data) => {
//
});
Apollo React useMutation hook
Unlike queries, mutations are typically used to create/update/delete data or perform server side-effects. For this purpose, React Query exports a useMutation hook.
Library: react
Shortcut: apollo.hook.mutation.use
0 Comments
Add Comment
Log in to add a comment