Describe the bug
Combining where.first + where.orderBy in create mutation = internal server error
Looks like #2786 (but this one is now solved)
To Reproduce
type Foo {
id: ID! @unique
bars: [Bar!]!
}
type Bar {
id: ID! @unique
quantity: Int!
}
internal server errormutation {
createFoo(
data: {
bars: {
create: [
{ quantity: 1 }
{ quantity: 2 }
]
}
}
) {
id
bars(first: 1, orderBy: createdAt_DESC) {
quantity
}
}
}
{
"data": {
"createFoo": {
"id": "cjm0ms9ed01ty0b77x9hudsoc",
"bars": null
}
},
"errors": [
{
"message": "Whoops. Looks like an internal server error. Search your server logs for request ID: local:api:cjm0ms9e801tw0b77c4bm2ypq",
"path": [
"createFoo",
"bars"
],
"locations": [
{
"line": 4,
"column": 5
}
],
"requestId": "local:api:cjm0ms9e801tw0b77c4bm2ypq"
}
]
}
Expected behavior
no internal server error would be ncie
Screenshots
If applicable, add screenshots to help explain your problem.
Versions (please complete the following information):
1.16.1I am able to reproduce this with server version: prismagraphql/prisma:1.16-beta
May be related to https://github.com/prisma/prisma/issues/3040
Can you share the actual internal server error from your server logs?
@marktani as far as I can remember nothing was printed on stdout, where are prisma logs? anyway you can easily reproduce it, if not I can update reproduction steps.
Please see my comment on https://github.com/prisma/prisma/issues/3040 to see how to circumvent this problem until we release a fix.
We just released 1.16.5 which fixes this issue.
@do4gr thanks