Commit b57fc65a authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch 'enable-immutable-pa' into 'master'

Prepare PA files for Apollo Client update

See merge request gitlab-org/gitlab!68758
parents 079122ca 8cb440a8
...@@ -56,7 +56,11 @@ export const initPipelineEditor = (selector = '#js-pipeline-editor') => { ...@@ -56,7 +56,11 @@ export const initPipelineEditor = (selector = '#js-pipeline-editor') => {
Vue.use(VueApollo); Vue.use(VueApollo);
const apolloProvider = new VueApollo({ const apolloProvider = new VueApollo({
defaultClient: createDefaultClient(resolvers, { typeDefs, useGet: true }), defaultClient: createDefaultClient(resolvers, {
typeDefs,
useGet: true,
assumeImmutableResults: true,
}),
}); });
const { cache } = apolloProvider.clients.defaultClient; const { cache } = apolloProvider.clients.defaultClient;
......
...@@ -134,7 +134,7 @@ export default { ...@@ -134,7 +134,7 @@ export default {
update(data) { update(data) {
const { ciConfig } = data || {}; const { ciConfig } = data || {};
const stageNodes = ciConfig?.stages?.nodes || []; const stageNodes = ciConfig?.stages?.nodes || [];
const stages = unwrapStagesWithNeeds(stageNodes); const stages = unwrapStagesWithNeeds(JSON.parse(JSON.stringify(stageNodes)));
return { ...ciConfig, stages }; return { ...ciConfig, stages };
}, },
......
...@@ -5,7 +5,12 @@ import createDefaultClient from '~/lib/graphql'; ...@@ -5,7 +5,12 @@ import createDefaultClient from '~/lib/graphql';
Vue.use(VueApollo); Vue.use(VueApollo);
const apolloProvider = new VueApollo({ const apolloProvider = new VueApollo({
defaultClient: createDefaultClient(), defaultClient: createDefaultClient(
{},
{
assumeImmutableResults: true,
},
),
}); });
export const initCommitPipelineMiniGraph = async (selector = '.js-commit-pipeline-mini-graph') => { export const initCommitPipelineMiniGraph = async (selector = '.js-commit-pipeline-mini-graph') => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment