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

Commit

Permalink
Remove void from MutationFunction Promise return type (#3458)
Browse files Browse the repository at this point in the history
* Remove `void` from `MutationFunction` Promise return type

The resolved value of the returned `Promise` from a
`MutationFunction` cannot be `void`.

Fixes #3432.

* Changelog update
  • Loading branch information
hwillson committed Sep 5, 2019
1 parent 331a68c commit a3dd7e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Changelog.md
Expand Up @@ -20,6 +20,8 @@
[@hwillson](https://github.com/hwillson) in [#3453](https://github.com/apollographql/react-apollo/pull/3453)
- SSR enhancements to support `network-only` and `cache-and-network` fetch policies, along with changes to ensure disabled SSR queries are not fired. <br/>
[@mikebm](https://github.com/mikebm) in [#3435](https://github.com/apollographql/react-apollo/pull/3435)
- Remove `void` from the `MutationFunction`'s returned Promise types. <br/>
[@hwillson](https://github.com/hwillson) in [#3458](https://github.com/apollographql/react-apollo/pull/3458)
- Documentation fixes. <br/>
[@SeanRoberts](https://github.com/SeanRoberts) in [#3380](https://github.com/apollographql/react-apollo/pull/3380)

Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/types/types.ts
Expand Up @@ -142,7 +142,7 @@ export declare type MutationFunction<
TVariables = OperationVariables
> = (
options?: MutationFunctionOptions<TData, TVariables>
) => Promise<void | MutationFetchResult<TData>>;
) => Promise<MutationFetchResult<TData>>;

/* Subscription types */

Expand Down

0 comments on commit a3dd7e6

Please sign in to comment.