diff --git a/backend/src/graphql/resolvers/posts.ts b/backend/src/graphql/resolvers/posts.ts index af807b041..7d419fcbb 100644 --- a/backend/src/graphql/resolvers/posts.ts +++ b/backend/src/graphql/resolvers/posts.ts @@ -154,7 +154,7 @@ export default { )` } const categoriesCypher = - config.CATEGORIES_ACTIVE && categoryIds + config.CATEGORIES_ACTIVE && categoryIds && categoryIds.length > 0 ? `WITH post UNWIND $categoryIds AS categoryId MATCH (category:Category {id: categoryId})