Describe the bug
As mentioned in the slack channel my Prisma server throws Java exceptions when querying multiple relations with a data model derived through introspect. 馃槃
To Reproduce
I've extracted a self-contained test case with instructions here:
https://github.com/berstend/prisma-relations-bug

query {
titles {
id
rating {
isPopular
}
meta {
releaseYear
}
}
}
# querying meta and rating at once will break things
Expected behavior
rating and meta return data with no exceptions thrown).prisma introspect or prisma deploy did complain about the schemaVersions (please complete the following information):
1.13, 1.14-beta, 1.15-alpha1.12.3 would not use my public schema but always the management one.Additional context
I don't think this problem is related to an existing issue on GH, but I'm not entirely sure.
Thanks!
Thanks a lot for the amazing bug report @berstend!
I just confirmed it on 1.14.0. We'll look into this next sprint 馃憣
I have an issue that sounds similar:
This works:
query templates(where:
task: {
taskGroup: {
id: "abc"
}
}
){
id
}
But this doesn't:
query templates(where:
task: {
taskGroup: {
session: {
id: "xyz"
}
}
}
){
id
}
Error message:
[33mprisma_1 |[0m org.postgresql.util.PSQLException: ERROR: missing FROM-clause entry for table "Session_TaskGroup_Alias"
Things broke when i tried to update to 1.14.0.
Edit: Things are still alright in 1.12.0.
I don't know if this is the same issue, I will try to reproduce it with a minimal example.
Edit: Separate issue here: #2954
Thanks @Jaszkowic, it does look like a separate issue to me! 馃檪
I experience similar error (I even think that it's the same).
@berstend can you confirm that if you check the logs, do you see something like the below?
java.util.concurrent.ExecutionException: Boxed Error
...
Caused by: java.lang.Error: Passed deferreds should not belong to different relations and should not have different arguments.
@marktani I was trying something and then I discovered that it works when I try to execute query similar to the following one (note the extra (where: { id_not: 0 }) in relations):
query {
titles {
id
rating(where: { id_not: 0 }) {
isPopular
}
meta(where: { id_not: 0 }) {
releaseYear
}
}
}
Thanks for reporting and providing thorough descriptions! 馃檹 We fixed this issue and it is available in version 1.15.2 馃帀 . The build will be available in a few minutes.
Most helpful comment
Thanks for reporting and providing thorough descriptions! 馃檹 We fixed this issue and it is available in version
1.15.2馃帀 . The build will be available in a few minutes.