1 | import { HttpHeaders } from '@angular/common/http';
|
2 | import { ApolloLink } from '@apollo/client/core';
|
3 |
|
4 | const httpHeaders = () => {
|
5 | return new ApolloLink((operation, forward) => {
|
6 | const { getContext, setContext } = operation;
|
7 | const context = getContext();
|
8 | if (context.headers) {
|
9 | setContext({
|
10 | ...context,
|
11 | headers: new HttpHeaders(context.headers),
|
12 | });
|
13 | }
|
14 | return forward(operation);
|
15 | });
|
16 | };
|
17 |
|
18 | /**
|
19 | * Generated bundle index. Do not edit.
|
20 | */
|
21 |
|
22 | export { httpHeaders };
|
23 | //# sourceMappingURL=ngApolloLinkHeaders.mjs.map
|