-
-
Notifications
You must be signed in to change notification settings - Fork 310
Open
Description
Describe the bug
When configuring ClientAwareness headers in apollo-angular v12, they only will become applied to the request when configuring them in the query context or by configuring them globally in the defaultContext. But the regular way to configure them directly in the ApolloClient.Options like before v12, doesn't work anymore:
provideApollo(() => ({
link: inject(HttpLink).create({
uri: '/graphql',
withCredentials: true
}),
cache: new InMemoryCache(),
clientAwareness: { // <-- this is the regular place to configure clientAwareness which worked before v12
name: 'my-client-name',
version: 'dev.0.0.1'
},
defaultContext: {
clientAwareness: { // <-- only when adding the clientAwareness config here, the related headers will become applied
name: 'my-client-name',
version: 'dev.0.0.1'
}
}
}));Expected behavior
clientAwareness configuration should be applied when adding them to the default location in ApolloClient.Options as before v12
Environment:
- @angular/[email protected]
- @angular/[email protected]
- @apollo/[email protected]
- [email protected]
- [email protected]
- [email protected]
Metadata
Metadata
Assignees
Labels
No labels