🚑 uhhh...
This commit is contained in:
parent
5a22b731fd
commit
d8ebf3b9c8
1 changed files with 3 additions and 2 deletions
5
app.js
5
app.js
|
@ -31,8 +31,9 @@ let schema = buildSchema(`
|
||||||
`);
|
`);
|
||||||
|
|
||||||
let root = {
|
let root = {
|
||||||
isOpen: ({ id }) => {
|
isOpen: async ({ id }) => {
|
||||||
return prisma.space.findUnique({ where: { id: id } }).open;
|
let data = await prisma.space.findUnique({ where: { id: id } });
|
||||||
|
return data.open;
|
||||||
},
|
},
|
||||||
spaces: () => {
|
spaces: () => {
|
||||||
return prisma.space.findMany();
|
return prisma.space.findMany();
|
||||||
|
|
Loading…
Reference in a new issue