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

clients.defaultClient is set when no defaultClient is defined #548

Closed
JohannesLamberts opened this issue Mar 15, 2019 · 0 comments
Closed
Labels

Comments

@JohannesLamberts
Copy link

this.clients.defaultClient is set to undefined, if no defaultClient is provided:
https://github.com/Akryum/vue-apollo/blob/768e4688b98c1f517b44637d636d0babfe4d64cc/src/apollo-provider.js#L7

This leeds vue-apollo to throw on getStates in
https://github.com/Akryum/vue-apollo/blob/2f1aa2534133530e7426615b3202b81fc9f001d1/ssr/index.js#L7

IMHO one should not be forced to define the defaultClient is multiple clients are used (first for explicity, second because getStates would otherwise export redundant data that would be sent to the client).

this.clients.defaultClient and this.defaultClient should only be set if Object.hasOwnProperty(options, 'defaultClient')

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

No branches or pull requests

2 participants