From fd5ce6bd1178f470eab4609da8da30747ae49231 Mon Sep 17 00:00:00 2001 From: Sendou Date: Mon, 16 Mar 2020 12:21:53 +0200 Subject: [PATCH] backend plus maplists route --- graphql-schemas/maps.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/graphql-schemas/maps.js b/graphql-schemas/maps.js index f7c3bb575..ff651e5a8 100644 --- a/graphql-schemas/maps.js +++ b/graphql-schemas/maps.js @@ -10,6 +10,7 @@ const maps = require("../utils/maps") const typeDef = gql` extend type Query { maplists: [Maplist!]! + plusMaplists: [Maplist!]! mapVotes: [MapVote!] } @@ -70,6 +71,9 @@ const resolvers = { }) }) }, + plusMaplists: (root, args) => { + return Maplist.find({ plus: { $ne: null } }) + }, mapVotes: async (root, args, ctx) => { if (!ctx.user || !ctx.user.plus || !ctx.user.plus.membership_status) { return null