Skip to content

Commit

Permalink
fix: only check id count if there are ids
Browse files Browse the repository at this point in the history
  • Loading branch information
tokebe committed Dec 13, 2023
1 parent 077dfa0 commit 9872e79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/query_graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default class QueryGraph {

_validateBatchSize(queryGraph: TrapiQueryGraph): void {
Object.entries(queryGraph.nodes).forEach(([nodeID, node]) => {
if (node.ids.length > 150) {
if (node.ids && node.ids.length > 150) {
throw new InvalidQueryGraphError(`Query node ${nodeID} exceeds batch size limit.`);
}
});
Expand Down

0 comments on commit 9872e79

Please sign in to comment.