Commit 04966ed9 authored by David O'Regan's avatar David O'Regan

Merge branch 'nmezzopera-adjust-query-and-mutation-names' into 'master'

ContainerRegistry: adjust query and mutation names

See merge request gitlab-org/gitlab!49928
parents 3c61465e d3c5c4d3
#import "~/graphql_shared/fragments/pageInfo.fragment.graphql" #import "~/graphql_shared/fragments/pageInfo.fragment.graphql"
#import "../fragments/container_repository.fragment.graphql" #import "../fragments/container_repository.fragment.graphql"
query getProjectContainerRepositories( query getGroupContainerRepositories(
$fullPath: ID! $fullPath: ID!
$name: String $name: String
$first: Int $first: Int
......
...@@ -12,8 +12,8 @@ import TagsList from '../components/details_page/tags_list.vue'; ...@@ -12,8 +12,8 @@ import TagsList from '../components/details_page/tags_list.vue';
import TagsLoader from '../components/details_page/tags_loader.vue'; import TagsLoader from '../components/details_page/tags_loader.vue';
import EmptyTagsState from '../components/details_page/empty_tags_state.vue'; import EmptyTagsState from '../components/details_page/empty_tags_state.vue';
import getContainerRepositoryDetailsQuery from '../graphql/queries/get_container_repository_details.graphql'; import getContainerRepositoryDetailsQuery from '../graphql/queries/get_container_repository_details.query.graphql';
import deleteContainerRepositoryTagsMutation from '../graphql/mutations/delete_container_repository_tags.graphql'; import deleteContainerRepositoryTagsMutation from '../graphql/mutations/delete_container_repository_tags.mutation.graphql';
import { import {
ALERT_SUCCESS_TAG, ALERT_SUCCESS_TAG,
......
...@@ -18,9 +18,9 @@ import RegistryHeader from '../components/list_page/registry_header.vue'; ...@@ -18,9 +18,9 @@ import RegistryHeader from '../components/list_page/registry_header.vue';
import ImageList from '../components/list_page/image_list.vue'; import ImageList from '../components/list_page/image_list.vue';
import CliCommands from '../components/list_page/cli_commands.vue'; import CliCommands from '../components/list_page/cli_commands.vue';
import getProjectContainerRepositories from '../graphql/queries/get_project_container_repositories.graphql'; import getProjectContainerRepositoriesQuery from '../graphql/queries/get_project_container_repositories.query.graphql';
import getGroupContainerRepositories from '../graphql/queries/get_group_container_repositories.graphql'; import getGroupContainerRepositoriesQuery from '../graphql/queries/get_group_container_repositories.query.graphql';
import deleteContainerRepository from '../graphql/mutations/delete_container_repository.graphql'; import deleteContainerRepositoryMutation from '../graphql/mutations/delete_container_repository.mutation.graphql';
import { import {
DELETE_IMAGE_SUCCESS_MESSAGE, DELETE_IMAGE_SUCCESS_MESSAGE,
...@@ -111,8 +111,8 @@ export default { ...@@ -111,8 +111,8 @@ export default {
}, },
graphQlQuery() { graphQlQuery() {
return this.config.isGroupPage return this.config.isGroupPage
? getGroupContainerRepositories ? getGroupContainerRepositoriesQuery
: getProjectContainerRepositories; : getProjectContainerRepositoriesQuery;
}, },
queryVariables() { queryVariables() {
return { return {
...@@ -152,7 +152,7 @@ export default { ...@@ -152,7 +152,7 @@ export default {
this.mutationLoading = true; this.mutationLoading = true;
return this.$apollo return this.$apollo
.mutate({ .mutate({
mutation: deleteContainerRepository, mutation: deleteContainerRepositoryMutation,
variables: { variables: {
id: this.itemToDelete.id, id: this.itemToDelete.id,
}, },
......
<script> <script>
import { GlAlert, GlSprintf, GlLink } from '@gitlab/ui'; import { GlAlert, GlSprintf, GlLink } from '@gitlab/ui';
import { isEqual, get, isEmpty } from 'lodash'; import { isEqual, get, isEmpty } from 'lodash';
import expirationPolicyQuery from '../graphql/queries/get_expiration_policy.graphql'; import expirationPolicyQuery from '../graphql/queries/get_expiration_policy.query.graphql';
import { import {
FETCH_SETTINGS_ERROR_MESSAGE, FETCH_SETTINGS_ERROR_MESSAGE,
UNAVAILABLE_FEATURE_TITLE, UNAVAILABLE_FEATURE_TITLE,
......
...@@ -20,7 +20,7 @@ import { ...@@ -20,7 +20,7 @@ import {
EXPIRATION_POLICY_FOOTER_NOTE, EXPIRATION_POLICY_FOOTER_NOTE,
} from '~/registry/settings/constants'; } from '~/registry/settings/constants';
import { formOptionsGenerator } from '~/registry/settings/utils'; import { formOptionsGenerator } from '~/registry/settings/utils';
import updateContainerExpirationPolicyMutation from '~/registry/settings/graphql/mutations/update_container_expiration_policy.graphql'; import updateContainerExpirationPolicyMutation from '~/registry/settings/graphql/mutations/update_container_expiration_policy.mutation.graphql';
import { updateContainerExpirationPolicy } from '~/registry/settings/graphql/utils/cache_update'; import { updateContainerExpirationPolicy } from '~/registry/settings/graphql/utils/cache_update';
import ExpirationDropdown from './expiration_dropdown.vue'; import ExpirationDropdown from './expiration_dropdown.vue';
import ExpirationInput from './expiration_input.vue'; import ExpirationInput from './expiration_input.vue';
......
import { produce } from 'immer'; import { produce } from 'immer';
import expirationPolicyQuery from '../queries/get_expiration_policy.graphql'; import expirationPolicyQuery from '../queries/get_expiration_policy.query.graphql';
export const updateContainerExpirationPolicy = projectPath => (client, { data: updatedData }) => { export const updateContainerExpirationPolicy = projectPath => (client, { data: updatedData }) => {
const queryAndParams = { const queryAndParams = {
......
...@@ -12,8 +12,8 @@ import TagsLoader from '~/registry/explorer/components/details_page/tags_loader. ...@@ -12,8 +12,8 @@ import TagsLoader from '~/registry/explorer/components/details_page/tags_loader.
import TagsList from '~/registry/explorer/components/details_page/tags_list.vue'; import TagsList from '~/registry/explorer/components/details_page/tags_list.vue';
import EmptyTagsState from '~/registry/explorer/components/details_page/empty_tags_state.vue'; import EmptyTagsState from '~/registry/explorer/components/details_page/empty_tags_state.vue';
import getContainerRepositoryDetailsQuery from '~/registry/explorer/graphql/queries/get_container_repository_details.graphql'; import getContainerRepositoryDetailsQuery from '~/registry/explorer/graphql/queries/get_container_repository_details.query.graphql';
import deleteContainerRepositoryTagsMutation from '~/registry/explorer/graphql/mutations/delete_container_repository_tags.graphql'; import deleteContainerRepositoryTagsMutation from '~/registry/explorer/graphql/mutations/delete_container_repository_tags.mutation.graphql';
import { import {
graphQLImageDetailsMock, graphQLImageDetailsMock,
......
...@@ -19,9 +19,9 @@ import { ...@@ -19,9 +19,9 @@ import {
SEARCH_PLACEHOLDER_TEXT, SEARCH_PLACEHOLDER_TEXT,
} from '~/registry/explorer/constants'; } from '~/registry/explorer/constants';
import getProjectContainerRepositories from '~/registry/explorer/graphql/queries/get_project_container_repositories.graphql'; import getProjectContainerRepositoriesQuery from '~/registry/explorer/graphql/queries/get_project_container_repositories.query.graphql';
import getGroupContainerRepositories from '~/registry/explorer/graphql/queries/get_group_container_repositories.graphql'; import getGroupContainerRepositoriesQuery from '~/registry/explorer/graphql/queries/get_group_container_repositories.query.graphql';
import deleteContainerRepository from '~/registry/explorer/graphql/mutations/delete_container_repository.graphql'; import deleteContainerRepositoryMutation from '~/registry/explorer/graphql/mutations/delete_container_repository.mutation.graphql';
import { import {
graphQLImageListMock, graphQLImageListMock,
...@@ -72,9 +72,9 @@ describe('List Page', () => { ...@@ -72,9 +72,9 @@ describe('List Page', () => {
localVue.use(VueApollo); localVue.use(VueApollo);
const requestHandlers = [ const requestHandlers = [
[getProjectContainerRepositories, resolver], [getProjectContainerRepositoriesQuery, resolver],
[getGroupContainerRepositories, groupResolver], [getGroupContainerRepositoriesQuery, groupResolver],
[deleteContainerRepository, mutationResolver], [deleteContainerRepositoryMutation, mutationResolver],
]; ];
apolloProvider = createMockApollo(requestHandlers); apolloProvider = createMockApollo(requestHandlers);
......
...@@ -3,7 +3,7 @@ import VueApollo from 'vue-apollo'; ...@@ -3,7 +3,7 @@ import VueApollo from 'vue-apollo';
import { GlAlert, GlSprintf, GlLink } from '@gitlab/ui'; import { GlAlert, GlSprintf, GlLink } from '@gitlab/ui';
import createMockApollo from 'jest/helpers/mock_apollo_helper'; import createMockApollo from 'jest/helpers/mock_apollo_helper';
import component from '~/registry/settings/components/registry_settings_app.vue'; import component from '~/registry/settings/components/registry_settings_app.vue';
import expirationPolicyQuery from '~/registry/settings/graphql/queries/get_expiration_policy.graphql'; import expirationPolicyQuery from '~/registry/settings/graphql/queries/get_expiration_policy.query.graphql';
import SettingsForm from '~/registry/settings/components/settings_form.vue'; import SettingsForm from '~/registry/settings/components/settings_form.vue';
import { import {
FETCH_SETTINGS_ERROR_MESSAGE, FETCH_SETTINGS_ERROR_MESSAGE,
......
...@@ -4,8 +4,8 @@ import createMockApollo from 'jest/helpers/mock_apollo_helper'; ...@@ -4,8 +4,8 @@ import createMockApollo from 'jest/helpers/mock_apollo_helper';
import waitForPromises from 'helpers/wait_for_promises'; import waitForPromises from 'helpers/wait_for_promises';
import Tracking from '~/tracking'; import Tracking from '~/tracking';
import component from '~/registry/settings/components/settings_form.vue'; import component from '~/registry/settings/components/settings_form.vue';
import updateContainerExpirationPolicyMutation from '~/registry/settings/graphql/mutations/update_container_expiration_policy.graphql'; import updateContainerExpirationPolicyMutation from '~/registry/settings/graphql/mutations/update_container_expiration_policy.mutation.graphql';
import expirationPolicyQuery from '~/registry/settings/graphql/queries/get_expiration_policy.graphql'; import expirationPolicyQuery from '~/registry/settings/graphql/queries/get_expiration_policy.query.graphql';
import { import {
UPDATE_SETTINGS_ERROR_MESSAGE, UPDATE_SETTINGS_ERROR_MESSAGE,
UPDATE_SETTINGS_SUCCESS_MESSAGE, UPDATE_SETTINGS_SUCCESS_MESSAGE,
......
import { updateContainerExpirationPolicy } from '~/registry/settings/graphql/utils/cache_update'; import { updateContainerExpirationPolicy } from '~/registry/settings/graphql/utils/cache_update';
import expirationPolicyQuery from '~/registry/settings/graphql/queries/get_expiration_policy.graphql'; import expirationPolicyQuery from '~/registry/settings/graphql/queries/get_expiration_policy.query.graphql';
describe('Registry settings cache update', () => { describe('Registry settings cache update', () => {
let client; let client;
......
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