I'm using Angular Apollo for one of our project. I'm creating the apollo client as:
this.apollo.create({
link: this.httpLink.create({ uri: `${environment.apiBase}/graphql?access_token=${this.tokenService.token}`}),
cache: new InMemoryCache()
})
Since our uri has an access token which also gets expired after a certain point of time, we had to refresh it and get the new access token, hence a new uri.
I was unable find any method in apollo docs regarding the way to update the uri(maybe I've missed it out?), also if I create a new instance like that, it throws me an error that apollo client is already present.
Is there any way to update the uri?