Skip to content
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

[Introspection] No ID: Why does it sometimes error and sometimes panic? #1515

Closed
janpio opened this issue Feb 4, 2020 · 2 comments
Closed

Comments

@janpio
Copy link
Member

janpio commented Feb 4, 2020

Investigate what is going on with ID errors and panics:

#1113
#1083

Why does it sometimes error and sometimes panic?
How is this even possible that the validator sometimes does not catch anything but lets it go to panic?

@janpio
Copy link
Member Author

janpio commented Feb 4, 2020

As the issues are some time old, we should probably start be reconfirming that the error messages actually still exist this way, and that what was identified back then as the problem of it is still true.

(#1113 for example is internally described as "Panic: Model (probably) has @@id, but Query Engine panics because unsupported" which is very different from how the issue looks like when you click it an read the examples we/I chose in the past)

@do4gr
Copy link
Member

do4gr commented Feb 5, 2020

This should now be fixed by prisma/prisma-engines#453

The problem was, that there was some hardcoded exception in the datamodel validator that was supposed to work together with TS introspection to allow Prisma M2M relation models to pass. It basically let through models without ids if they had two required relation fields.

That was not targeted enough and is also not needed anymore since the Rust introspection does not render models for Prisma M2M relations.

Removing it turns the panics into validation errors as wanted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants