Marcus
08/25/2018, 8:07 PMMarcus
08/25/2018, 8:08 PMlet place = await context.prisma.query.place(
{
where: {
id: args.placeId
}
},
'{owners {id}}',
);
if (place.owners.filter(owner => owner.id === userId).length < 1) {
throw new Error("Place does not belong to User.")
}
Is there anyway to get the filtering part into the query?Marcus
08/25/2018, 8:09 PMMarcus
08/25/2018, 8:10 PMwhere : {
owners_contains : {
id: userId
}
}
Marcus
08/25/2018, 8:12 PMtype Place {
....
owners: [User!]!
....
}
Marcus
08/25/2018, 8:12 PMnoahdavis
08/25/2018, 8:21 PMEntrepreneur3
08/26/2018, 12:29 PMcatalinmiron
08/26/2018, 12:32 PMEntrepreneur3
08/26/2018, 1:00 PMcatalinmiron
08/26/2018, 1:04 PMEntrepreneur3
08/26/2018, 1:22 PMNick
08/26/2018, 5:27 PMCtrl
+ Space
for auto-suggestions or Ctrl
+ Click
to see type-definitionsmacro_jackson
08/27/2018, 12:25 AMgraphql-playground
for local dev and keep getting the attached TS error. Anyone run into it before?Andres Montoya
08/27/2018, 2:13 AMGorodov Maksim
08/27/2018, 2:44 PMtype Task {
id: ID! @unique
title: String!
user: User!
}
Now my subscription looks like this:
const taskCreated = {
subscribe: (_, args, context, info) => {
return context.prisma.subscription.task({ where: { mutation_in: ['CREATED'] } }, info);
},
};
Now ALL my users get task when somebody created a task, but only 1 user should get it (the user who created it). How can I do it?obivan86
08/27/2018, 2:49 PMpatrick
08/27/2018, 3:13 PMsdubois
08/27/2018, 3:59 PMcatalinmiron
08/27/2018, 4:23 PMSeba
08/27/2018, 7:56 PMAndres Montoya
08/27/2018, 8:06 PMjohnleider
08/27/2018, 8:09 PMlancej
08/28/2018, 3:11 AMprisma deploy
or prisma deploy --force
it gets stuck with the message Applying changes (1/57) ⣯
. Has anyone come across this issue and/or know of a solution?Christian Ruff
08/28/2018, 5:55 AMMarcus
08/28/2018, 9:06 AMnilan
08/28/2018, 9:12 AMPatrik Molnar
08/28/2018, 9:53 AMCprogs
08/28/2018, 11:03 AMmehdyouras
08/28/2018, 11:58 AM