From d8ebf3b9c84df1004229fe22b83eee047d11e423 Mon Sep 17 00:00:00 2001 From: ryzetech Date: Thu, 19 Jan 2023 10:00:08 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=20uhhh...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index b520485..809469c 100644 --- a/app.js +++ b/app.js @@ -31,8 +31,9 @@ let schema = buildSchema(` `); let root = { - isOpen: ({ id }) => { - return prisma.space.findUnique({ where: { id: id } }).open; + isOpen: async ({ id }) => { + let data = await prisma.space.findUnique({ where: { id: id } }); + return data.open; }, spaces: () => { return prisma.space.findMany();