This repository has been archived by the owner on Nov 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Return type of the mutate
function
#89
Comments
I agree. We're currently handling mutation responses like this. The
|
Good catch! |
Yeah. Thanks @leeor! @fakenickels It's a quick fix, so I can open a PR later today |
"He said and did it a week later" |
Haha no problem! |
@fakenickels I didn't use the correct keyword in the PR yesterday, so this wasn't automatically closed. |
Merged
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The
mutate
function, the first item in the tuple returned fromuseMutation()
is defined to be of the type:https://github.com/Astrocoders/reason-apollo-hooks/blob/b5d9c32ad7f7691f7d4f0d6887465815c9b7e26e/src/ApolloHooksMutation.re#L64-L73
When called, the mutation promise is handled here:
https://github.com/Astrocoders/reason-apollo-hooks/blob/b5d9c32ad7f7691f7d4f0d6887465815c9b7e26e/src/ApolloHooksMutation.re#L143-L155
Seems to me that
mutation('a)
should return a promise resolving toresult('a)
instead:https://github.com/Astrocoders/reason-apollo-hooks/blob/b5d9c32ad7f7691f7d4f0d6887465815c9b7e26e/src/ApolloHooksMutation.re#L13-L16
The
mutation('a)
type was added in d4cc1a5.The text was updated successfully, but these errors were encountered: