Surface schema validation errors during Re-Introspection and change flow #3082
Labels
kind/feature
A request for a new feature.
tech/engines
Issue for tech Engines.
topic: previewFeatures
Issue touches on an preview feature flag
topic: re-introspection
Milestone
(Currently Re-Introspection is in an experimental state and has its own flag to be activated.)
The command
prisma introspection --experimental-reintrospection
just returns a warning when it receives an invalid Prisma schema (that it needs to work its Re-Introspection magic). It then proceeds to run a normalprisma introspection
and still delivers a valid schema.This can be annoying for users with big schemas, that make it hard to pinpoint the reason why the schema is invalid. See #3044 (comment)
We should change this behavior to instead error out and return the validation errors for the invalid schema. Additionally, we should introduce a flag that allows the user to ignore the invalid schema (
--clean
,--fresh
,--force
,--overwrite
or similar).This is what this would look like:
prisma introspection --experimental-reintrospection
prisma introspection --experimental-reintrospection --clean
prisma introspection
After Re-Introspection leaves the experimental state the commands can be collapsed into:
prisma introspection
prisma introspection --clean
The text was updated successfully, but these errors were encountered: