Skip to content

Conversation

@fnoop
Copy link
Contributor

@fnoop fnoop commented Nov 18, 2018

Add the query key as an additional to the result callback function, to allow the callback function to identify which query the result is coming from. This is very useful to use allow manual SmartQuery instances to take action based on what type or client of query is incoming. This is particularly crucial when trying to use vue-apollo to connect to multiple backends with the same schema (#216).

@fnoop
Copy link
Contributor Author

fnoop commented Nov 18, 2018

ps - the key parameter might be more intuitive as the first parameter, but added after data to leave it backwards compatible with existing code.

@fnoop
Copy link
Contributor Author

fnoop commented Nov 18, 2018

result callback call from subscription also needs key parameter added (subsequent push)

@Akryum Akryum merged commit 5a92745 into vuejs:master Jan 9, 2019
@fnoop
Copy link
Contributor Author

fnoop commented Jan 9, 2019

Thank you :)

@fnoop fnoop deleted the callback-key branch January 9, 2019 08:57
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.

2 participants