From f6426fee2a1b81d380ceb64e25a65431dfb1bf5a Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Fri, 16 Jan 2026 18:30:56 +0100 Subject: [PATCH] removed groupPinned field resolver as it is inefficient when we require the value in database anyways. --- backend/src/graphql/resolvers/posts.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/src/graphql/resolvers/posts.ts b/backend/src/graphql/resolvers/posts.ts index 847212027..543bcf546 100644 --- a/backend/src/graphql/resolvers/posts.ts +++ b/backend/src/graphql/resolvers/posts.ts @@ -662,7 +662,9 @@ export default { 'MATCH (this)<-[obs:OBSERVES]-(related:User {id: $cypherParams.currentUserId}) WHERE obs.active = true RETURN COUNT(related) >= 1', }, }), - groupPinned: async (parent, _params, context, _resolveInfo) => { + // As long as we rely on the filter capabilities of the neo3jgrahql library, + // we cannot filter on this type of field. Hence we need to save the value to the database. + /* groupPinned: async (parent, _params, context, _resolveInfo) => { return ( ( await context.database.query({ @@ -673,7 +675,7 @@ export default { }) ).records.length === 1 ) - }, + }, */ relatedContributions: async (parent, _params, context, _resolveInfo) => { if (typeof parent.relatedContributions !== 'undefined') return parent.relatedContributions const { id } = parent