ambethia
08/30/2018, 3:20 PMDaniel Mahon
08/30/2018, 4:12 PMambethia
08/30/2018, 4:28 PMambethia
08/30/2018, 4:28 PMambethia
08/30/2018, 4:29 PMmichal.tomsia
08/30/2018, 7:42 PMTomas
08/31/2018, 12:25 AMlancej
08/31/2018, 1:58 AMTomas
08/31/2018, 1:58 AMTomas
08/31/2018, 1:59 AMTomas
08/31/2018, 2:14 AMval
08/31/2018, 7:30 AMupdatedAt
field of a type when a new connection is added to one of it's relations?val
08/31/2018, 7:31 AMcontent
item as also updated". I can't manually update the updatedAt
fieldmichal.tomsia
08/31/2018, 7:58 AMMarcus
08/31/2018, 8:40 AMknowbody
08/31/2018, 11:48 AMGorodov Maksim
08/31/2018, 12:46 PMGorodov Maksim
08/31/2018, 1:13 PMHamish
08/31/2018, 1:15 PMHamish
08/31/2018, 1:16 PMHamish
08/31/2018, 1:16 PMDaVinciLord
08/31/2018, 2:44 PMone-to-many
relation between two types.
I can get the elements from this direction one -> many
but I cannot get the element from the other direction.
Example:
type Author {
id: ID! @unique
books: [Book!]! // can get by invoking ctx.db.query.books({where:{author{id: "id"}}})
}
type Book {
id: ID! @unique
author: Author! <- // I don't know how to get this one from only the fields the book have, (console.log only show the id in this case)
}
Dalia
08/31/2018, 6:03 PMDateTime
but I get the following error
throw new Error('Type "' + typeRef.name.value + '" not found in document.');
^
Error: Type "DateTime" not found in document.
Do you have any idea on what am I doing wrong?Dalia
08/31/2018, 6:04 PMtimestamp: DateTime
diego086
08/31/2018, 8:14 PMasync placesWithFriends(parent, args, ctx, info) {
const id = getUserId(ctx)
const friends = await ctx.db.query.user({ where: { id } },
`{
friends{
friend{
id
}
}}`
)
let idsFriends = friends.friends.map(friend => friend.friend.id)
return ctx.db.query.places({ where: {
checkins_every:{
user:{
id_in: idsFriends
}
}
}}, info)
},
which the outcome is the same as this one:
query{
places(
where: {
checkins_some:{
user:{
id_in:["cxxxxxxxxxx8829pbcte3g", "cjlxxxxxxxxxx882zi7drfeh"] #ARRAY idsFriends
}
}
}
){
id
name
checkins{
user{
id
name
}
}
}
}
but im trying to set the "where" clause on the checkins like this
query{
places{
id
name
checkins(
where: {
user:{
id_in:["cjlxxxxxxxxxxnpt8osm", "cjle5yxxxxxxxxx82czmke786"] #ARRAY idsFriends
}
}
){
user{
id
name
}
}
}
}
i cannot do that exact query on the resolver because when i use "ctx.db.query.places({ where..." it will filter the places and i need ALL the places, what im trying to do is filter the checkins inside every placeKristof
09/01/2018, 5:03 AMprisma.yml
file, but vscode complains the values in there are not valid each time it starts, is there a way to have some default values in there in case there is no explicit env file loaded?br
09/01/2018, 5:40 PMbr
09/01/2018, 7:03 PMprisma introspect
on an existing postgres db can't be then deployed? Just a limitation of the tool as it currently is? prisma deploy
says there are lots of small errors with the datamodel file.Khoa Huynh
09/02/2018, 2:09 AMNick
09/02/2018, 8:47 AM