Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useMutation's errorPolicy missing from docs #7320

Closed
lorensr opened this issue Nov 13, 2020 · 3 comments
Closed

useMutation's errorPolicy missing from docs #7320

lorensr opened this issue Nov 13, 2020 · 3 comments

Comments

@lorensr
Copy link
Contributor

lorensr commented Nov 13, 2020

https://www.apollographql.com/docs/react/data/mutations/#usemutation-api
https://www.apollographql.com/docs/react/api/react/hooks/#params-2

Also, the first link doesn't list:

  • the first param (the mutation)
  • the update option
@lnikkila
Copy link

It looks like MutationFunctionOptions seems to be missing errorPolicy as well, although this option seems to work in practice:

export interface MutationFunctionOptions<
TData = any,
TVariables = OperationVariables
> {
variables?: TVariables;
optimisticResponse?: TData | ((vars: TVariables) => TData);
refetchQueries?: Array<string | PureQueryOptions> | RefetchQueriesFunction;
awaitRefetchQueries?: boolean;
update?: MutationUpdaterFn<TData>;
context?: Context;
fetchPolicy?: WatchQueryFetchPolicy;
}

@phryneas
Copy link
Member

phryneas commented Jan 9, 2025

It looks like at some point, the useMutation errorPolicy made it into the docs, so I'm going to close this now. Thank you for the report!

@phryneas phryneas closed this as completed Jan 9, 2025
Copy link
Contributor

github-actions bot commented Jan 9, 2025

Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Client usage and allow us to serve you better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants