debian-mirror-gitlab/app/assets/javascripts/sidebar/graphql.js
2021-06-08 01:23:25 +05:30

22 lines
536 B
JavaScript

import { IntrospectionFragmentMatcher } from 'apollo-cache-inmemory';
import VueApollo from 'vue-apollo';
import createDefaultClient from '~/lib/graphql';
import introspectionQueryResultData from './fragmentTypes.json';
const fragmentMatcher = new IntrospectionFragmentMatcher({
introspectionQueryResultData,
});
export const defaultClient = createDefaultClient(
{},
{
cacheConfig: {
fragmentMatcher,
},
assumeImmutableResults: true,
},
);
export const apolloProvider = new VueApollo({
defaultClient,
});