import type { DocumentNode } from "graphql"; import type { TypedDocumentNode } from "@graphql-typed-document-node/core"; import type { MutationHookOptions, MutationTuple, NoInfer } from "../types/types.js"; import type { ApolloCache, DefaultContext, OperationVariables } from "../../core/index.js"; /** * * * > Refer to the [Mutations](https://www.apollographql.com/docs/react/data/mutations/) section for a more in-depth overview of `useMutation`. * * @example * ```jsx * import { gql, useMutation } from '@apollo/client'; * * const ADD_TODO = gql` * mutation AddTodo($type: String!) { * addTodo(type: $type) { * id * type * } * } * `; * * function AddTodo() { * let input; * const [addTodo, { data }] = useMutation(ADD_TODO); * * return ( *