Commit e646fca7 authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch '227385-remove-edges-geo' into 'master'

Geo - GraphQL Remove Edges

Closes #227385

See merge request gitlab-org/gitlab!36491
parents 035d510d 22a541d8
......@@ -9,17 +9,15 @@ export default graphQlFieldName => {
pageInfo {
...PageInfo
}
edges {
node {
id
packageFileId
state
retryCount
lastSyncFailure
retryAt
lastSyncedAt
createdAt
}
nodes {
id
packageFileId
state
retryCount
lastSyncFailure
retryAt
lastSyncedAt
createdAt
}
}
}
......
......@@ -56,7 +56,7 @@ export const fetchReplicableItemsGraphQl = ({ state, dispatch }, direction) => {
})
.then(res => {
const registries = res.data.geoNode.packageFileRegistries;
const data = registries.edges.map(e => e.node);
const data = registries.nodes;
const pagination = {
...registries.pageInfo,
page: state.paginationData.page,
......
......@@ -53,22 +53,18 @@ export const MOCK_BASIC_GRAPHQL_QUERY_RESPONSE = {
geoNode: {
packageFileRegistries: {
pageInfo: MOCK_GRAPHQL_PAGINATION_DATA,
edges: [
nodes: [
{
node: {
id: 'git/1',
packageFileId: '1',
state: 'PENDING',
lastSyncedAt: null,
},
id: 'git/1',
packageFileId: '1',
state: 'PENDING',
lastSyncedAt: null,
},
{
node: {
id: 'git/2',
packageFileId: '2',
state: 'SYNCED',
lastSyncedAt: null,
},
id: 'git/2',
packageFileId: '2',
state: 'SYNCED',
lastSyncedAt: null,
},
],
},
......
......@@ -132,7 +132,7 @@ describe('GeoReplicable Store Actions', () => {
describe('with no direction set', () => {
const direction = null;
const registries = MOCK_BASIC_GRAPHQL_QUERY_RESPONSE.geoNode?.packageFileRegistries;
const data = registries.edges.map(e => e.node);
const data = registries.nodes;
it('should call gqClient with no before/after variables as well as a first variable but no last variable', () => {
testAction(
......@@ -159,7 +159,7 @@ describe('GeoReplicable Store Actions', () => {
describe('with direction set to "next"', () => {
const direction = NEXT;
const registries = MOCK_BASIC_GRAPHQL_QUERY_RESPONSE.geoNode?.packageFileRegistries;
const data = registries.edges.map(e => e.node);
const data = registries.nodes;
it('should call gqClient with after variable but no before variable as well as a first variable but no last variable', () => {
testAction(
......@@ -191,7 +191,7 @@ describe('GeoReplicable Store Actions', () => {
describe('with direction set to "prev"', () => {
const direction = PREV;
const registries = MOCK_BASIC_GRAPHQL_QUERY_RESPONSE.geoNode?.packageFileRegistries;
const data = registries.edges.map(e => e.node);
const data = registries.nodes;
it('should call gqClient with before variable but no after variable as well as a last variable but no first variable', () => {
testAction(
......
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