summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/pipelines/pipeline_shared_client.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/pipelines/pipeline_shared_client.js')
-rw-r--r--app/assets/javascripts/pipelines/pipeline_shared_client.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/assets/javascripts/pipelines/pipeline_shared_client.js b/app/assets/javascripts/pipelines/pipeline_shared_client.js
index c3be487caae..84276588d6a 100644
--- a/app/assets/javascripts/pipelines/pipeline_shared_client.js
+++ b/app/assets/javascripts/pipelines/pipeline_shared_client.js
@@ -1,10 +1,19 @@
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,
},
),