You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
The type MutationFunction used in react-components returns a Promise<void | MutationFetchResult<TData>> which makes it hard to use the result without first checking the result is defined.
This was discussed in #2095 and a fix was made for react-hooks in #3334 but the issue still remains in react-components.
As far as I'm aware, it would make sense that the mutation function does not return void in both react-hooks and react-components.
* Remove `void` from `MutationFunction` Promise return type
The resolved value of the returned `Promise` from a
`MutationFunction` cannot be `void`.
Fixes#3432.
* Changelog update
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The type
MutationFunction
used in react-components returns aPromise<void | MutationFetchResult<TData>>
which makes it hard to use the result without first checking the result is defined.This was discussed in #2095 and a fix was made for react-hooks in #3334 but the issue still remains in react-components.
As far as I'm aware, it would make sense that the mutation function does not return void in both react-hooks and react-components.
The type is defined here:
react-apollo/packages/common/src/types/types.ts
Lines 140 to 145 in 3c961c3
This occurs in react-apollo 3.0.1.
The text was updated successfully, but these errors were encountered: