-
Notifications
You must be signed in to change notification settings - Fork 45
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
Enum imported form nexus-prisma doesn't have autocomplete value #159
Comments
I'm closing this as a misunderstanding of what
|
@jasonkuhrt sorry, i think im not describe it clearly, here's my question Is is possible to expose enum property for autocomplete directly via nexus-prisma generated interface? |
@sooxt98 I'll need some convincing for this because its a significantly different use-case than what nexus-prisma is trying to give you. I get the appeal at first but as an API it doesn't make much sense. |
@jasonkuhrt its easily to get confused with two different import and need another name just for enumType, why not just combine like the User interface from nexus-prisma Pros:
Doesnt it look nicer and simpler to have one import instead of two? I like nexus-prisma alot, i think this simple touch could make developer life alot easier by providing consistency, i cant think of any cons for doing this ,thanks 💖 |
The con of this is that its a enum use-case served by a much larger and unrelated source of data. So many example where the fit is awkward.
I'm against this on principal as it trades API concern/coherence for convenience. I am definitely onboard with you about the problem, but not this solution yet. If you could easily import NP in a name-spaced way, perhaps that would help. |
@jasonkuhrt yea It's kinda anti-pattern, maybe it could be an extra optional option for those who needs to write cleaner code? The nexus-prisma hovering card do show the enum types but with some weird typing above, however i do think the np one's is looking much cleaner maybe i should find a way to make it NP-less |
Currently need to import twice from
@prisma/client
andnexus-prisma
, one for GraphQL schema another for valuesThe text was updated successfully, but these errors were encountered: