apollo-angular icon indicating copy to clipboard operation
apollo-angular copied to clipboard

Apollo Angular did not apply the existing http interceptor

Open hantsy opened this issue 3 years ago • 0 comments

The original question is posted on the stackoverflow, but I can not find a solution to overcome this. there is an example can be used to produce it.

I added an angular client to interact with the GraphQL backend.

In this Angular project, I used Apollo Angular to send queries, and I also used Auth0 Angular SDK to handle the authentication and authorization.

I followed the official Apollo Angular guide to add a GraphQLmodule, I have to add the Authorization header myself.

The original HTTP Interceptors which works in Http/Rest case did not work here.

I think Apollo Angular is also dependent on the Angular HttpClientModule, but why I have to set the Authorization manually?

hantsy avatar Jul 05 '21 12:07 hantsy