apollo-angular
Version:
Use your GraphQL data in your Angular app, with the Apollo Client
1 lines • 1.12 kB
Source Map (JSON)
{"version":3,"file":"apollo-angular-headers.mjs","sources":["../../headers/src/index.ts","../../headers/src/apollo-angular-headers.ts"],"sourcesContent":["import { HttpHeaders } from '@angular/common/http';\nimport { ApolloLink } from '@apollo/client';\n\nexport class HttpHeadersLink extends ApolloLink {\n constructor() {\n super((operation, forward) => {\n const { getContext, setContext } = operation;\n const context = getContext();\n\n if (context.headers) {\n setContext({ headers: new HttpHeaders(context.headers) });\n }\n\n return forward(operation);\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAGM,MAAO,eAAgB,SAAQ,UAAU,CAAA;AAC7C,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,CAAC,CAAC,SAAS,EAAE,OAAO,KAAI;AAC3B,YAAA,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,SAAS;AAC5C,YAAA,MAAM,OAAO,GAAG,UAAU,EAAE;AAE5B,YAAA,IAAI,OAAO,CAAC,OAAO,EAAE;AACnB,gBAAA,UAAU,CAAC,EAAE,OAAO,EAAE,IAAI,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;YAC3D;AAEA,YAAA,OAAO,OAAO,CAAC,SAAS,CAAC;AAC3B,QAAA,CAAC,CAAC;IACJ;AACD;;AChBD;;AAEG;;;;"}