Skip to content

Commit

Permalink
feat: allow inferred explain-type queries
Browse files Browse the repository at this point in the history
  • Loading branch information
tokebe authored and colleenXu committed Mar 22, 2024
1 parent 7ec573a commit 8deeada
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/inferred_mode/inferred_mode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,9 @@ export default class InferredQueryHandler {
return false;
}

const tooManyIDs =
1 <
Object.values(this.queryGraph.nodes).reduce((sum, node) => {
return typeof node.ids !== 'undefined' ? sum + node.ids.length : sum;
}, 0);
const tooManyIDs = Object.values(this.queryGraph.nodes).some((node) => {
return typeof node.ids !== 'undefined' && node.ids.length > 1;
});
if (tooManyIDs) {
const message = 'Inferred Mode queries with multiple IDs are not supported. Your query terminates.';
this.logs.push(new LogEntry('WARNING', null, message).getLog());
Expand Down

0 comments on commit 8deeada

Please sign in to comment.