Commit abc01407 authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch '325679-replace-write-data-with-write-query' into 'master'

Replace `writeData` with `writeQuery` in Static Site Editor

See merge request gitlab-org/gitlab!57526
parents 8816566a 27227aec
import Vue from 'vue';
import VueApollo from 'vue-apollo';
import createDefaultClient from '~/lib/graphql';
import appDataQuery from './queries/app_data.query.graphql';
import fileResolver from './resolvers/file';
import hasSubmittedChangesResolver from './resolvers/has_submitted_changes';
import submitContentChangesResolver from './resolvers/submit_content_changes';
......@@ -28,7 +29,8 @@ const createApolloProvider = (appData) => {
// eslint-disable-next-line @gitlab/require-i18n-strings
const mounts = appData.mounts.map((mount) => ({ __typename: 'Mount', ...mount }));
defaultClient.cache.writeData({
defaultClient.cache.writeQuery({
query: appDataQuery,
data: {
appData: {
__typename: 'AppData',
......
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