-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Input Object type ... must define one or more fields in a m-n Relation #1354
Comments
Having the same issue. I realized that nexus 0.26.0 and up, will just not run nor generate the api.graphql file, and that also causes the model/crud objects to not be added into the nexus context. (VS Code does not recognizes the objects, even after restarting TS Server) With version 0.25.0 the nexus server starts, generates the graphql file but as soon as you try to access it, I get the same issue:
In my case even if I add all the fields I still can't get the error to go away, and I can see the object has no fields on the prisma generated client:
|
Well, not sure if it is the same case, but mine just fails when I add any t.crud.updateOneXXXX methods. It just goes right to complain about these missing fields. But it I just leave the queries, then it compiles correctly. Tested with nexus 0.26.1.
|
I think that upsertOnes will also triger the issue @sfratini I am not using nexus. but i have the same issue with @nexus/schema 0.14.0 and nexus-prisma 0.13.0 |
I just created one specific bug for that and I can confirm the upsert triggers the same issue for me. |
Any fix/update on this? I'm facing same issue. |
Maybe this is a prisma bug rather than a nexus one.
Nexus Report
Description
I have a m - n relation which does not have any additional meta field in the pivot table.
So when there are only the minimal needed columns defined for the relation the error pops up. When i add an additional field all is ok. Example follows:
when modelling the prisma schema like so the error is thrown:
This is okay:
I should be able to define an explicit model also without meta information.
The text was updated successfully, but these errors were encountered: