Open Jayphen opened 4 years ago
The types for useMutation indicate that it does support errorPolicy.
errorPolicy
useMutation is typed with OperationVariables as the second parameter: https://github.com/apollographql/react-apollo/blob/master/packages/hooks/src/useMutation.ts#L8
OperationVariables
OperationVariables has an errorPolicy type https://github.com/apollographql/react-apollo/blob/master/packages/common/src/types/types.ts#L34
Thus, the typings for useMutation indicate that it supports errorPolicy, when in fact the setting will be silently ignored.
useMutation
@apollo/react-hooks 3.0.1
@apollo/react-hooks
I've opened a PR here: https://github.com/apollographql/apollo-client/pull/5863
The types for useMutation indicate that it does support
errorPolicy
.useMutation is typed with
OperationVariables
as the second parameter: https://github.com/apollographql/react-apollo/blob/master/packages/hooks/src/useMutation.ts#L8OperationVariables
has anerrorPolicy
type https://github.com/apollographql/react-apollo/blob/master/packages/common/src/types/types.ts#L34Thus, the typings for
useMutation
indicate that it supportserrorPolicy
, when in fact the setting will be silently ignored.@apollo/react-hooks
3.0.1