UNPKG

1.1 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":";;;MAGa,WAAW,GAAG;IACzB,OAAO,IAAI,UAAU,CAAC,CAAC,SAAoB,EAAE,OAAiB;QAC5D,MAAM,EAAC,UAAU,EAAE,UAAU,EAAC,GAAG,SAAS,CAAC;QAC3C,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;QAE7B,IAAI,OAAO,CAAC,OAAO,EAAE;YACnB,UAAU,iCACL,OAAO,KACV,OAAO,EAAE,IAAI,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC,IACzC,CAAC;SACJ;QAED,OAAO,OAAO,CAAC,SAAS,CAAC,CAAC;KAC3B,CAAC,CAAC;AACL;;ACjBA;;;;;;"}
\No newline at end of file