Skip to content

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

Closed
@JohannesLamberts

Description

@JohannesLamberts

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')

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions