Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

add client to the mutation result #3417

Merged
2 changes: 2 additions & 0 deletions packages/hooks/src/data/MutationData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ export class MutationData<
public execute(result: MutationResult<TData>) {
this.isMounted = true;
this.verifyDocumentType(this.getOptions().mutation, DocumentType.Mutation);

result.client = this.client || this.refreshClient().client;
return [this.runMutation, result] as MutationTuple<TData, TVariables>;
}

Expand Down