import { FetchResult } from '@apollo/client/core' ; import { CustomQuery } from '@vue-storefront/core' ; import removeItemFromCart from './removeItemFromCart' ; import { RemoveItemFromCartInput , RemoveItemFromCartMutation , RemoveItemFromCartMutationVariables , } from '../../types/GraphQL' ; import { Context } from '../../types/context' ; export default async ( context , input , customQuery = { removeItemFromCart : 'removeItemFromCart' } ) : Promise < FetchResult < RemoveItemFromCartMutation > > => { const { removeItemFromCart : removeItemFromCartGQL } = context . extendQuery ( customQuery , { removeItemFromCart : { query : removeItemFromCart , variables : { input } , } , } ) ; return context . client . mutate < RemoveItemFromCartMutation , RemoveItemFromCartMutationVariables > ( { mutation : removeItemFromCartGQL . query , variables : removeItemFromCartGQL . variables , } ) ; } ;