From 572377acfde8e6a07f3fb32b598b4cf9b15b6969 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Mon, 5 Sep 2022 20:06:10 +0200 Subject: [PATCH] add active categories to user --- backend/src/schema/types/type/User.gql | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/backend/src/schema/types/type/User.gql b/backend/src/schema/types/type/User.gql index b84606ff7..d2ac79037 100644 --- a/backend/src/schema/types/type/User.gql +++ b/backend/src/schema/types/type/User.gql @@ -114,6 +114,14 @@ type User { badgesCount: Int! @cypher(statement: "MATCH (this)<-[:REWARDED]-(r:Badge) RETURN COUNT(r)") emotions: [EMOTED] + + activeCategories: [Category] @cypher( + statement: """ + MATCH (category:Category) + WHERE NOT ((this)-[:NOT_INTERESTED_IN]->(category)) + RETURN category + """ + ) }