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