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
Removal of undocumented support for type
alias with Prisma 4.0.0
#9939
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
We will trigger a warning for our users who happen to use them in their code, so we can ask some questions and maybe decide on actually doing a real implementation with docs and such. |
Any plans to have an other way to do:
Something like?
|
Yes, #5039 is maching what I have in mind. thx. |
I'm not totally opposed to removing it if there's a suitable alternative, but, why are we removing this? This seems like a perfectly useful feature. Is it doing any harm by being there? Here is an example of where I use it: // Period-delimited numeric-only object identifiers.
type OIDs = String It might seem trivial, but being able to alias types like this makes my schema more self-documenting. I'd like to continue using this, or something that can at least currently provide this functionality. |
A few reasons:
What we should do is to design something proper, test it and discuss it. Then finally document it. I think a new keyword |
Okay, thank you for clearing that up. I do think |
type
alias with Prisma 4.0.0
For what it's worth, my team had been planning use type aliases to work around date and datetime limitations in Prisma: #4355 (comment) Looks like we might need to rely on our own comments or parsing on top of the Prisma schema to get the desired behavior. |
Yeah, sorry about that - but those were only partially implemented anyway so I would not have been surprised if you hit a nasty limit or edge case somewhere. Have a look at #5039 if this would help with your problem, we see this as the better re-implementation of what this could have been. |
Yes, that is exactly what we need. I see now that you mentioned it above as well. We'll stay (eagerly) tuned for that -- thanks for an otherwise amazing tool! |
With the release of Prisma 3.7.0 the VSCode extension (and other IDEs using our language server implementation) will start to show a warning when we detecting unsupported usage of the type keyword.
An example of that is string aliases such as:
We plan to remove that functionality entirely with the next major release of Prisma. If you happen to depend on similar functionality for string aliasing, please leave a comment.
Thank you!
The text was updated successfully, but these errors were encountered: