Commit 401c77ab authored by Phil Hughes's avatar Phil Hughes

Merge branch...

Merge branch '325677-replace-writedata-with-writequery-in-app-assets-javascripts-repository-index-js' into 'master'

Replace `writeData` in `app/assets/javascripts/repository/index.js`

See merge request gitlab-org/gitlab!57348
parents 0e31e8f4 eeb7b156
......@@ -9,6 +9,10 @@ import Breadcrumbs from './components/breadcrumbs.vue';
import DirectoryDownloadLinks from './components/directory_download_links.vue';
import LastCommit from './components/last_commit.vue';
import apolloProvider from './graphql';
import commitsQuery from './queries/commits.query.graphql';
import projectPathQuery from './queries/project_path.query.graphql';
import projectShortPathQuery from './queries/project_short_path.query.graphql';
import refsQuery from './queries/ref.query.graphql';
import createRouter from './router';
import { updateFormAction } from './utils/dom';
import { setTitle } from './utils/title';
......@@ -19,13 +23,32 @@ export default function setupVueRepositoryList() {
const { projectPath, projectShortPath, ref, escapedRef, fullName } = dataset;
const router = createRouter(projectPath, escapedRef);
apolloProvider.clients.defaultClient.cache.writeData({
apolloProvider.clients.defaultClient.cache.writeQuery({
query: commitsQuery,
data: {
commits: [],
},
});
apolloProvider.clients.defaultClient.cache.writeQuery({
query: projectPathQuery,
data: {
projectPath,
},
});
apolloProvider.clients.defaultClient.cache.writeQuery({
query: projectShortPathQuery,
data: {
projectShortPath,
},
});
apolloProvider.clients.defaultClient.cache.writeQuery({
query: refsQuery,
data: {
ref,
escapedRef,
commits: [],
},
});
......
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