debian-mirror-gitlab/app/assets/javascripts/pipelines/pipeline_shared_client.js
2022-03-02 08:16:31 +05:30

20 lines
521 B
JavaScript

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