import { FetchPolicy, FetchResult } from "@apollo/client/core"; import type { CustomHeaders } from "@vue-storefront/magento-types"; import { Context } from "../../types/context"; /** * Send an arbitrary GraphQL mutation to the Magento GraphQL endpoint * For sending query, please see {@link https://docs.vuestorefront.io/integrations/magento/api/magento-api/customQuery | customQuery}. * * @example * Simple usage: * ```ts * import { sdk } from '~/sdk.config.ts'; * * // Prepare custom mutation * // Do not use gql-tag (gql``) here. * // For syntax highlighting (provided by respective IDE extensions), add the `#graphql` comment at the start of the template string * const mutation = `#graphql * mutation generateCustomerToken($email: String!, $password: String!) { * generateCustomerToken(email: $email, password: $password) { * token * } * } *`; * * // Prepare mutation variables * const mutationVariables = { * email: TEST_USER_EMAIL, * password: TEST_USER_PASSWORD * }; * * // use custom mutation and variables to fetch response adjusted to your needs * const result = await sdk.magento.customMutation({ * mutation, * mutationVariables * }); * ``` */ export declare function customMutation(context: Context, { mutation, mutationVariables, fetchPolicy, customHeaders, }: { mutation: string; mutationVariables: MUTATION_VARIABLES; fetchPolicy?: Extract; customHeaders?: CustomHeaders; }): Promise>; //# sourceMappingURL=index.d.ts.map