From 9872e79bc13f90408335c880778555e9743f36db Mon Sep 17 00:00:00 2001 From: tokebe <43009413+tokebe@users.noreply.github.com> Date: Wed, 13 Dec 2023 15:14:22 -0500 Subject: [PATCH] fix: only check id count if there are ids --- src/query_graph.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/query_graph.ts b/src/query_graph.ts index e9b6dc19..7a6f9d80 100644 --- a/src/query_graph.ts +++ b/src/query_graph.ts @@ -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.`); } });