Commit 9078f3f3 authored by jerasmus's avatar jerasmus

Update query name

Updated the GraphQL query name
parent edf6a259
......@@ -9,8 +9,8 @@ import {
GlHoverLoadDirective,
} from '@gitlab/ui';
import { escapeRegExp } from 'lodash';
import paginatedTreeQuery from 'shared_queries/repository/paginated_tree.query.graphql';
import filesQuery from 'shared_queries/repository/files.query.graphql';
import paginatedTreeQuery from 'shared_queries/repository/paginated_tree.query.graphql';
import { escapeFileUrl } from '~/lib/utils/url_utility';
import { TREE_PAGE_SIZE } from '~/repository/constants';
import FileIcon from '~/vue_shared/components/file_icon.vue';
......
<script>
import paginatedTreeQuery from 'shared_queries/repository/paginated_tree.query.graphql';
import filesQuery from 'shared_queries/repository/files.query.graphql';
import paginatedTreeQuery from 'shared_queries/repository/paginated_tree.query.graphql';
import createFlash from '~/flash';
import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import { __ } from '../../locale';
......
import paginatedTreeQuery from 'shared_queries/repository/paginated_tree.query.graphql';
import filesQuery from 'shared_queries/repository/files.query.graphql';
import paginatedTreeQuery from 'shared_queries/repository/paginated_tree.query.graphql';
import projectPathQuery from '../queries/project_path.query.graphql';
import getRefMixin from './get_ref';
......
......@@ -7,7 +7,7 @@ fragment TreeEntry on Entry {
type
}
query getFiles($projectPath: ID!, $path: String, $ref: String!, $nextPageCursor: String) {
query getPaginatedTree($projectPath: ID!, $path: String, $ref: String!, $nextPageCursor: String) {
project(fullPath: $projectPath) {
id
__typename
......
import { shallowMount } from '@vue/test-utils';
import filesQuery from 'shared_queries/repository/files.query.graphql';
import paginatedTreeQuery from 'shared_queries/repository/paginated_tree.query.graphql';
import FilePreview from '~/repository/components/preview/index.vue';
import FileTable from '~/repository/components/table/index.vue';
import TreeContent from '~/repository/components/tree_content.vue';
......@@ -22,6 +22,7 @@ function factory(path, data = () => ({})) {
provide: {
glFeatures: {
increasePageSizeExponentially: true,
paginatedTreeGraphqlQuery: true,
},
},
});
......@@ -58,7 +59,7 @@ describe('Repository table component', () => {
it('normalizes edge nodes', () => {
factory('/');
const output = vm.vm.normalizeData('blobs', [{ node: '1' }, { node: '2' }]);
const output = vm.vm.normalizeData('blobs', { nodes: ['1', '2'] });
expect(output).toEqual(['1', '2']);
});
......@@ -168,7 +169,7 @@ describe('Repository table component', () => {
vm.vm.fetchFiles();
expect($apollo.query).toHaveBeenCalledWith({
query: filesQuery,
query: paginatedTreeQuery,
variables: {
pageSize,
nextPageCursor: '',
......
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