2021-06-08 01:23:25 +05:30
|
|
|
import { IntrospectionFragmentMatcher } from 'apollo-cache-inmemory';
|
2021-04-17 20:07:23 +05:30
|
|
|
import VueApollo from 'vue-apollo';
|
|
|
|
import createDefaultClient from '~/lib/graphql';
|
2021-06-08 01:23:25 +05:30
|
|
|
import introspectionQueryResultData from './fragmentTypes.json';
|
2021-04-17 20:07:23 +05:30
|
|
|
|
2021-06-08 01:23:25 +05:30
|
|
|
const fragmentMatcher = new IntrospectionFragmentMatcher({
|
|
|
|
introspectionQueryResultData,
|
|
|
|
});
|
|
|
|
|
|
|
|
export const defaultClient = createDefaultClient(
|
|
|
|
{},
|
|
|
|
{
|
|
|
|
cacheConfig: {
|
|
|
|
fragmentMatcher,
|
|
|
|
},
|
|
|
|
assumeImmutableResults: true,
|
|
|
|
},
|
|
|
|
);
|
2021-04-17 20:07:23 +05:30
|
|
|
|
|
|
|
export const apolloProvider = new VueApollo({
|
|
|
|
defaultClient,
|
|
|
|
});
|