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

Allow setting new ApolloLink after ApolloClient instantiation #6193

Merged
merged 1 commit into from
Jun 2, 2020

Conversation

hwillson
Copy link
Member

Provides support for setting a new ApolloLink (or link chain) after new ApolloClient() has been called, using a public ApolloClient.setLink() method.

This is a follow up of #3877, and a continuation of #4297.

Provides support for setting a new `ApolloLink` (or link chain)
after `new ApolloClient()` has been called, using a public
`ApolloClient.setLink()` method.
@benjamn benjamn changed the title Allow a new Apollolink to be set after ApolloClient instantiation Allow setting new ApolloLink after ApolloClient instantiation Jun 2, 2020
Copy link
Member

@benjamn benjamn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

* Define a new ApolloLink (or link chain) that Apollo Client will use.
*/
public setLink(newLink: ApolloLink) {
this.link = this.queryManager.link = newLink;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious, why this.link is used. As observing a bug because of it. The chain keeps on adding because of this.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Moniv9 please open a separate issue with your details and a small runnable reproduction.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @hwillson, I have added a issue here - #8182

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants