apollo-angular
Version:
Use your GraphQL data in your Angular app, with the Apollo Client
1 lines • 1.56 kB
Source Map (JSON)
{"version":3,"file":"apollo-angular-persisted-queries.mjs","sources":["../../persisted-queries/src/index.ts","../../persisted-queries/src/apollo-angular-persisted-queries.ts"],"sourcesContent":["import { ApolloLink } from '@apollo/client/link';\nimport { SetContextLink } from '@apollo/client/link/context';\nimport { PersistedQueryLink } from '@apollo/client/link/persisted-queries';\n\nexport type Options = PersistedQueryLink.Options;\n\nconst transformLink = new SetContextLink(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: PersistedQueryLink.Options) =>\n ApolloLink.from([new PersistedQueryLink(options), transformLink]);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAMA,MAAM,aAAa,GAAG,IAAI,cAAc,CAAC,OAAO,IAAG;IACjD,MAAM,GAAG,GAAQ,EAAE;AAEnB,IAAA,IAAI,OAAO,CAAC,IAAI,EAAE;QAChB,GAAG,CAAC,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,YAAY;QAC5C,GAAG,CAAC,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,iBAAiB;IACxD;IAEA,IAAI,OAAO,CAAC,YAAY,IAAI,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE;QACvD,GAAG,CAAC,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,MAAM;IAC1C;AAEA,IAAA,OAAO,GAAG;AACZ,CAAC,CAAC;MAEW,wBAAwB,GAAG,CAAC,OAAmC,KAC1E,UAAU,CAAC,IAAI,CAAC,CAAC,IAAI,kBAAkB,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC;;ACtBlE;;AAEG;;;;"}