UNPKG

1.64 kBSource Map (JSON)View Raw
1{"version":3,"file":"ngApolloLinkPersisted.mjs","sources":["../../persisted-queries/src/index.ts","../../persisted-queries/src/ngApolloLinkPersisted.ts"],"sourcesContent":["import {ApolloLink} from '@apollo/client/link/core';\nimport {setContext} from '@apollo/client/link/context';\nimport {createPersistedQueryLink as _createPersistedQueryLink} from '@apollo/client/link/persisted-queries';\n\nexport type Options = Parameters<typeof _createPersistedQueryLink>[0];\n\nconst transformLink = setContext((_, context) => {\n const ctx: any = {};\n\n if (context.http) {\n ctx.includeQuery = context.http.includeQuery;\n ctx.includeExtensions = context.http.includeExtensions;\n }\n\n if (context.fetchOptions && context.fetchOptions.method) {\n ctx.method = context.fetchOptions.method;\n }\n\n return ctx;\n});\n\nexport const createPersistedQueryLink = (options?: Options) =>\n ApolloLink.from([_createPersistedQueryLink(options), transformLink as any]);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["_createPersistedQueryLink"],"mappings":";;;;AAMA,MAAM,aAAa,GAAG,UAAU,CAAC,CAAC,CAAC,EAAE,OAAO,KAAI;IAC9C,MAAM,GAAG,GAAQ,EAAE,CAAC;IAEpB,IAAI,OAAO,CAAC,IAAI,EAAE;QAChB,GAAG,CAAC,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC;QAC7C,GAAG,CAAC,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC;AACxD,KAAA;IAED,IAAI,OAAO,CAAC,YAAY,IAAI,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE;QACvD,GAAG,CAAC,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC;AAC1C,KAAA;AAED,IAAA,OAAO,GAAG,CAAC;AACb,CAAC,CAAC,CAAC;MAEU,wBAAwB,GAAG,CAAC,OAAiB,KACxD,UAAU,CAAC,IAAI,CAAC,CAACA,0BAAyB,CAAC,OAAO,CAAC,EAAE,aAAoB,CAAC;;ACtB5E;;AAEG;;;;"}
\No newline at end of file