UNPKG

1.21 kBSource Map (JSON)View Raw
1{"version":3,"file":"ngApolloLinkHeaders.mjs","sources":["../../headers/src/index.ts","../../headers/src/ngApolloLinkHeaders.ts"],"sourcesContent":["import {HttpHeaders} from '@angular/common/http';\nimport {ApolloLink, Operation, NextLink} from '@apollo/client/core';\n\nexport const httpHeaders = () => {\n return new ApolloLink((operation: Operation, forward: NextLink) => {\n const {getContext, setContext} = operation;\n const context = getContext();\n\n if (context.headers) {\n setContext({\n ...context,\n headers: new HttpHeaders(context.headers),\n });\n }\n\n return forward(operation);\n });\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAGO,MAAM,WAAW,GAAG,MAAK;IAC9B,OAAO,IAAI,UAAU,CAAC,CAAC,SAAoB,EAAE,OAAiB,KAAI;AAChE,QAAA,MAAM,EAAC,UAAU,EAAE,UAAU,EAAC,GAAG,SAAS,CAAC;AAC3C,QAAA,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;QAE7B,IAAI,OAAO,CAAC,OAAO,EAAE;AACnB,YAAA,UAAU,CACL,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,OAAO,CACV,EAAA,EAAA,OAAO,EAAE,IAAI,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC,IACzC,CAAC;AACJ,SAAA;AAED,QAAA,OAAO,OAAO,CAAC,SAAS,CAAC,CAAC;AAC5B,KAAC,CAAC,CAAC;AACL;;ACjBA;;AAEG;;;;"}
\No newline at end of file