Skip to content

Commit

Permalink
Add more information about deprecation of useMutation ignoreResults o…
Browse files Browse the repository at this point in the history
…ption
  • Loading branch information
Cellule committed Jan 23, 2025
1 parent 9849694 commit 5ccf837
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .changeset/khaki-cars-develop.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
---

Deprecate option `ignoreResults` in `useMutation`.
Once this option is removed, existing code still using it might see increase in re-renders.
Instead, please use `useApolloClient` to get your ApolloClient instance and call `client.mutate` directly.
5 changes: 4 additions & 1 deletion src/react/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,10 @@ export interface BaseMutationOptions<
onError?: (error: ApolloError, clientOptions?: BaseMutationOptions) => void;
/**
* {@inheritDoc @apollo/client!MutationOptionsDocumentation#ignoreResults:member}
* @deprecated This property will be removed in the next major version of Apollo Client
*
* @deprecated This property will be removed in the next major version of Apollo Client.
* Once this option is removed, existing code still using it might see increase in re-renders.
* Instead, please use `useApolloClient` to get your ApolloClient instance and call `client.mutate` directly.
*/
ignoreResults?: boolean;
}
Expand Down

0 comments on commit 5ccf837

Please # to comment.