Commit 61dc8aaf authored by mfluharty's avatar mfluharty

Adjust query to get nodes without edges

We're not using the edges for anything anyway
parent 22282d54
......@@ -36,15 +36,12 @@ export default {
},
update({
project: {
pipeline: { codeQualityReports: { edges = [], pageInfo = {}, count = 0 } = {} } = {},
pipeline: { codeQualityReports: { nodes = [], pageInfo = {}, count = 0 } = {} } = {},
} = {},
}) {
return {
edges,
parsedList: parseCodeclimateMetrics(
edges.map((edge) => edge.node),
this.blobPath,
),
nodes,
parsedList: parseCodeclimateMetrics(nodes, this.blobPath),
count,
pageInfo,
};
......@@ -62,7 +59,7 @@ export default {
data() {
return {
codequalityViolations: {
edges: [],
nodes: [],
parsedList: [],
count: 0,
pageInfo: {},
......@@ -116,9 +113,9 @@ export default {
},
updateQuery: (previousResult, { fetchMoreResult }) => {
return produce(fetchMoreResult, (draftData) => {
draftData.project.pipeline.codeQualityReports.edges = [
...previousResult.project.pipeline.codeQualityReports.edges,
...draftData.project.pipeline.codeQualityReports.edges,
draftData.project.pipeline.codeQualityReports.nodes = [
...previousResult.project.pipeline.codeQualityReports.nodes,
...draftData.project.pipeline.codeQualityReports.nodes,
];
});
},
......
......@@ -5,14 +5,12 @@ query getCodeQualityViolations($projectPath: ID!, $iid: ID!, $first: Int, $after
pipeline(iid: $iid) {
codeQualityReports(first: $first, after: $after) {
count
edges {
node {
line
description
path
fingerprint
severity
}
nodes {
line
description
path
fingerprint
severity
}
pageInfo {
...PageInfo
......
......@@ -114,7 +114,7 @@ describe('Codequality report app', () => {
pipeline: {
codeQualityReports: {
...codeQualityViolations,
edges: [],
nodes: [],
count: 0,
},
},
......
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