Skip to content

Commit

Permalink
Fixed executeMutation type in useMutation hook result (#412)
Browse files Browse the repository at this point in the history
* Fixed executeMutation type in useMutation hook

* Fixed typecheck command
  • Loading branch information
jBugman authored and kitten committed Aug 28, 2019
1 parent 7b4160e commit 5343e47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ yarn build
Or run just the TypeScript build for type checks:

```sh
yarn build:types
yarn run check
```

## How do I test my changes?
Expand Down
5 changes: 4 additions & 1 deletion src/hooks/useMutation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ export interface UseMutationState<T> {

export type UseMutationResponse<T, V> = [
UseMutationState<T>,
(variables?: V) => Promise<OperationResult<T>>
(
variables?: V,
context?: Partial<OperationContext>
) => Promise<OperationResult<T>>
];

export const useMutation = <T = any, V = object>(
Expand Down

0 comments on commit 5343e47

Please sign in to comment.