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.`); } });