UNPKG

apollo-angular

Version:

Use your GraphQL data in your Angular app, with the Apollo Client

25 lines (21 loc) 860 B
import { ApolloLink } from '@apollo/client/link/core'; import { setContext } from '@apollo/client/link/context'; import { createPersistedQueryLink as createPersistedQueryLink$1 } from '@apollo/client/link/persisted-queries'; const ɵ0 = (_, context) => { const ctx = {}; if (context.http) { ctx.includeQuery = context.http.includeQuery; ctx.includeExtensions = context.http.includeExtensions; } if (context.fetchOptions && context.fetchOptions.method) { ctx.method = context.fetchOptions.method; } return ctx; }; const transformLink = setContext0); const createPersistedQueryLink = (options) => ApolloLink.from([createPersistedQueryLink$1(options), transformLink]); /** * Generated bundle index. Do not edit. */ export { createPersistedQueryLink, ɵ0 }; //# sourceMappingURL=ngApolloLinkPersisted.js.map