Skip to content

Commit

Permalink
graphql: Diff fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tbantle22 committed Nov 17, 2023
1 parent fe8d7ef commit 284a429
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
30 changes: 17 additions & 13 deletions graphql-server/src/diffStats/diffStat.resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,26 @@ export class DiffStatResolver {
const type = args.type ?? CommitDiffType.TwoDot;
checkArgs(args);

return this.dss.query(async query => {
if (type === CommitDiffType.ThreeDot) {
const res = await query(getThreeDotDiffStatQuery(!!args.tableName), [
`${args.toRefName}...${args.fromRefName}`,
return this.dss.query(
async query => {
if (type === CommitDiffType.ThreeDot) {
const res = await query(getThreeDotDiffStatQuery(!!args.tableName), [
`${args.toRefName}...${args.fromRefName}`,
args.tableName,
]);
return fromDoltDiffStat(res);
}

const res = await query(getDiffStatQuery(!!args.tableName), [
args.fromRefName,
args.toRefName,
args.tableName,
]);
return fromDoltDiffStat(res);
}

const res = await query(getDiffStatQuery(!!args.tableName), [
args.fromRefName,
args.toRefName,
args.tableName,
]);
return fromDoltDiffStat(res);
}, args.databaseName);
},
args.databaseName,
args.refName,
);
}
}

Expand Down
1 change: 1 addition & 0 deletions graphql-server/src/diffSummaries/diffSummary.resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export class DiffSummaryResolver {
return this.dss.query(
async q => getDiffSummaries(q, args),
args.databaseName,
args.refName,
);
}
}
Expand Down

0 comments on commit 284a429

Please sign in to comment.