-
-
Notifications
You must be signed in to change notification settings - Fork 310
Description
Describe the bug
In apollo-angular v12, the @apollo/client DefaultContext interface becomes redefined via declaration-merging and specifies the headers property to be strictly of type HttpHeaders , which wasn't the case with pre-v12 versions.
This contradicts how headers are processed and handled in general, either by the underlying @apollo/client package, which just supports Record<string, string> or even apollo-angular, which finally checks if the headers provided in a query context are instanceof HttpHeaders and if not it will just accept a regular object.
Expected behavior
I'm requesting to at least define the headers prop as a union to allow HttpHeaders | Record<string, string>, as I'm currently forced to again redeclare the DefaultContext for supporting that.
Environment:
- @angular/[email protected]
- @angular/[email protected]
- @apollo/[email protected]
- [email protected]
- [email protected]
- [email protected]