Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Apollo): make use of generic type on MutationOptions in Apollo#mutate #342

Closed

Conversation

Merott
Copy link

@Merott Merott commented Aug 10, 2017

Without this the MutationOptions generic takes the default type of { [key: string]: any; } which isn't very useful. This is needed by the updateQueries option to detect the right type for the mutationResult data object.

@apollo-cla
Copy link

@Merott: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/

@Merott Merott force-pushed the apollo-mutate-options-typing branch 2 times, most recently from e59f241 to b560446 Compare August 10, 2017 11:38
@kamilkisiela
Copy link
Owner

Hi! I will update everything around Angular and TypeScript soon, then I'm going to merge this :)

@kamilkisiela
Copy link
Owner

@Merott Hi! :) Could you rebase it?

@Merott
Copy link
Author

Merott commented Sep 18, 2017

I just rebased, but in doing so I also removed the explicit types on the method, since TypeScript can infer them perfectly fine, and making them explicit makes human errors more likely.

The same could be done for query, mutate and subscribe. I've verified that on my machine but not committed. I'd be happy to commit and push if you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants