File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
vue-apollo-composable/src Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 4040
4141## Return
4242
43- - ` mutate ` : call the mutation with this function.
43+ - ` mutate(variables, overrideOptions) ` : call the mutation with this function.
4444
4545- ` loading ` : boolean ` Ref ` tracking the progress of the mutation.
4646
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export function useMutation<
3434 // Apollo Client
3535 const { resolveClient } = useApolloClient ( )
3636
37- async function mutate ( variables : TVariables = null ) {
37+ async function mutate ( variables : TVariables = null , overrideOptions : Omit < UseMutationOptions , 'variables' > ) {
3838 let currentDocument : DocumentNode
3939 if ( typeof document === 'function' ) {
4040 currentDocument = document ( )
@@ -56,6 +56,7 @@ export function useMutation<
5656 const result = await client . mutate ( {
5757 mutation : currentDocument ,
5858 ...currentOptions ,
59+ ...overrideOptions ,
5960 variables : {
6061 ...variables || { } ,
6162 ...currentOptions . variables || { } ,
You can’t perform that action at this time.
0 commit comments