debian-mirror-gitlab/app/assets/javascripts/pipelines/pipeline_shared_client.js

21 lines
521 B
JavaScript
Raw Normal View History

2021-04-29 21:17:54 +05:30
import VueApollo from 'vue-apollo';
2022-03-02 08:16:31 +05:30
import { IntrospectionFragmentMatcher } from 'apollo-cache-inmemory';
2021-04-29 21:17:54 +05:30
import createDefaultClient from '~/lib/graphql';
2022-03-02 08:16:31 +05:30
import introspectionQueryResultData from './graphql/fragmentTypes.json';
export const fragmentMatcher = new IntrospectionFragmentMatcher({
introspectionQueryResultData,
});
2021-04-29 21:17:54 +05:30
export const apolloProvider = new VueApollo({
defaultClient: createDefaultClient(
{},
{
2022-03-02 08:16:31 +05:30
cacheConfig: {
fragmentMatcher,
},
2021-04-29 21:17:54 +05:30
useGet: true,
},
),
});