Moritz
02/07/2018, 3:31 PMreturn ctx.db.mutation.updateBook(
{
where: { id },
data: {
author: {
connect: {
id: authorId
}
}
cover: {
connect: {
id: coverId
}
}
}
}, info)
Wherein authorId
and coverId
could optionally be empty.
If I simple pass the empty parameters i get the You provided an invalid argument for the where selector
error message.max
02/07/2018, 3:57 PMauthorId
or coverId
?max
02/07/2018, 3:58 PMMoritz
02/07/2018, 3:58 PMYou provided an invalid argument for the where selector
error message.juicycleff
02/07/2018, 3:58 PMmax
02/07/2018, 3:59 PMwhere
. Do you have a valid ID?Moritz
02/07/2018, 4:02 PMwhere
from the connect...
Error: You provided an invalid argument for the where selector on Author.
My query has the author input:
"author": {
"connect": {}
}
Moritz
02/07/2018, 4:04 PMjuicycleff
02/07/2018, 4:08 PMjuicycleff
02/07/2018, 4:08 PMjuicycleff
02/07/2018, 4:08 PMMoritz
02/07/2018, 4:11 PM"author": {
"connect": {}
}
and the above error. This is when I have an optional mutation param author
that is not passed in the mutation. This is not the behavior I was expecting...Moritz
02/07/2018, 4:16 PMjuicycleff
02/07/2018, 4:16 PMjuicycleff
02/07/2018, 4:16 PMjuicycleff
02/07/2018, 4:16 PMjuicycleff
02/07/2018, 4:17 PMMoritz
02/07/2018, 4:21 PMMoritz
02/07/2018, 4:21 PMjuicycleff
02/07/2018, 4:26 PMjuicycleff
02/07/2018, 4:27 PMMoritz
02/07/2018, 4:28 PMauthor: {
connect: {
id: authorId
}
}
cover: {
connect: {
id: coverId
}
}
instead of
author: {
connect: authorId
}
cover: {
connect: coverId
}
Moritz
02/07/2018, 4:29 PMMoritz
02/07/2018, 4:29 PMjuicycleff
02/07/2018, 4:31 PM