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(Object.assign(Object.assign({}, context), { headers: new HttpHeaders(context.headers) }));
|
10 | }
|
11 | return forward(operation);
|
12 | });
|
13 | };
|
14 |
|
15 | /**
|
16 | * Generated bundle index. Do not edit.
|
17 | */
|
18 |
|
19 | export { httpHeaders };
|
20 | //# sourceMappingURL=ngApolloLinkHeaders.mjs.map
|