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/cli@20.3.9
- @angular/core@20.3.10
- @apollo/client@4.0.9
- apollo-angular@12.1.0
- graphql@16.10.0
- typescript@5.9.3
Describe the bug
When configuring ClientAwareness headers in
apollo-angularv12, they only will become applied to the request when configuring them in the querycontextor by configuring them globally in thedefaultContext. But the regular way to configure them directly in theApolloClient.Optionslike before v12, doesn't work anymore:Expected behavior
clientAwareness configuration should be applied when adding them to the default location in
ApolloClient.Optionsas before v12Environment: