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] Internal mode that makes decision about resolving name clashed of sanitized/renamed field and enum values #10530

Closed
janpio opened this issue Dec 1, 2021 · 1 comment
Assignees
Labels

Comments

@janpio
Copy link
Member

janpio commented Dec 1, 2021

Introspection currently has an opinionation not to try to figure out alternative names for columns and enum values that become clashing during the name sanitizing process, and instead let users figure out better ways themselves after they get a validation error.

Instead we could have a mode, activated via a flag, that comes up with a way to make these schemas valid at the cost of creating sub optimal names for these fields and values.

This would help us a lot in internal Schema Management Confidence Tooling (Introspection-CI and Migrations-CI) to actually run these schemas through the further tooling and tests instead of failing in step 1.

@janpio janpio changed the title Internal mode that makes decision about renaming of field and enum values in Introspection [Introspection] Internal mode that makes decision about resolving name clashed of sanitized/renamed field and enum values Dec 1, 2021
@janpio
Copy link
Member Author

janpio commented Feb 8, 2024

We are fine with using the official mode and have some schemas as "not valid" after Introspection.
If we needed to overcome that, a simple solution would be some string replacements in the resulting Prisma schema instead.

@janpio janpio closed this as not planned Won't fix, can't repro, duplicate, stale Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants