UNPKG

839 BJavaScriptView Raw
1import { ApolloLink } from '@apollo/client/link/core';
2import { setContext } from '@apollo/client/link/context';
3import { createPersistedQueryLink as createPersistedQueryLink$1 } from '@apollo/client/link/persisted-queries';
4
5const transformLink = setContext((_, context) => {
6 const ctx = {};
7 if (context.http) {
8 ctx.includeQuery = context.http.includeQuery;
9 ctx.includeExtensions = context.http.includeExtensions;
10 }
11 if (context.fetchOptions && context.fetchOptions.method) {
12 ctx.method = context.fetchOptions.method;
13 }
14 return ctx;
15});
16const createPersistedQueryLink = (options) => ApolloLink.from([createPersistedQueryLink$1(options), transformLink]);
17
18/**
19 * Generated bundle index. Do not edit.
20 */
21
22export { createPersistedQueryLink };
23//# sourceMappingURL=ngApolloLinkPersisted.mjs.map