reasonml-community / reason-apollo-hooks

Deprecated in favor of https://github.com/reasonml-community/graphql-ppx
https://reasonml-community.github.io/reason-apollo-hooks/
MIT License
136 stars 28 forks source link

Feat/full result from mutation promise #98

Closed mbirkegaard closed 4 years ago

mbirkegaard commented 4 years ago

This makes the promise returned by mutate resolve to a tuple of a (simple, full) result similar to what the mutation hook does, as discussed in #99.

Since it's breaking anyway I also changed the Error to Errors in the variant (it's also plural in the record from js). Also removed a dependency on ReasonApolloTypes.executionResult.

This PR assumes #97 will be merged.

fakenickels commented 4 years ago

oh this makes a lot of sense! I really liked the idea but it is a quite a breaking change. I'm going to await a bit more so we can merge this after

mbirkegaard commented 4 years ago

oh this makes a lot of sense! I really liked the idea but it is a quite a breaking change. I'm going to await a bit more so we can merge this after

Okay. Figured I might as well get the PR for this up since #97 is breaking anyway.

mbirkegaard commented 4 years ago

Had forgotten to mark this ready for review after #97 got merged.

mbirkegaard commented 4 years ago

@fakenickels Are we fine with merging this? Or is there some non-breaking stuff we should get in first?

fakenickels commented 4 years ago

I think we are!