From a9c8bdd652f27907b69f63da1d65fb6dc3c7f6e4 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 10 Feb 2019 19:25:54 +0100 Subject: [PATCH] Enabling to check if member is invited --- src/schema/queries/Events.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/schema/queries/Events.js b/src/schema/queries/Events.js index f2d0536e6..c50241e10 100644 --- a/src/schema/queries/Events.js +++ b/src/schema/queries/Events.js @@ -13,6 +13,7 @@ const args = { state: { type: EventStateEnum }, hostId: { type: GraphQLString }, participantId: { type: GraphQLString }, + inviteeId: { type: GraphQLString }, minStartDate: { type: GraphQLInt }, maxStartDate: { type: GraphQLInt }, minEndDate: { type: GraphQLInt }, @@ -23,6 +24,7 @@ const resolve = (parent, { state, hostId, participantId, + inviteeId, minStartDate, maxStartDate, minEndDate, @@ -39,6 +41,7 @@ const resolve = (parent, { state ? { state } : { state: { $nin: [UNPUBLISHED, ARCHIVED] } }, hostId ? { hostId } : {}, participantId ? { participants: { $elemMatch: { participantId } } } : {}, + inviteeId ? { invitations: { $elemMatch: { inviteeId } } } : {}, minStartDate || maxStartDate ? { startDatetime: