-
-
Notifications
You must be signed in to change notification settings - Fork 51
[Feature request] Support for non-input types + variables #403
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
Comments
@robertherber Thanks! However, I don't support variable for now. Need implementation. |
Could you tell me example use-case and the code? I want to reference as real world examples for implementation. (Specifically, I want to know Why you can't use InputObject) |
@robertherber I'm sorry for being late.
|
Sorry for making it confusing by not providing a syntactically correct schema, I've fixed the example now. The point is still that I'd like to be able to use arguments directly sent to a mutation and not rely on creating intermediate Input types when it's not necessary. |
@robertherber I'm not sure what are you expected typescript code generation if I can implement to generate via variables. Could you give me the example? As I mentioned earlier, variables are document syntax, not schema. |
I’m not talking about documents but the schema which I hope is clear after I updated the example 🙂 |
@robertherber I meant What do you want Zod schema for variables If you defined this document?
|
@robertherber I created PR for variables but only for schema. |
I just published this as 0.12.0 |
Thanks @Code-Hex for creating this plugin! :)
We're doing end-to-end typesafety all the way from MongoDB to the client with our GraphQL schema as a base. Currently we're doing it TypeScript-only, but looking to improve on the DX as well as strictness by using zod both for client-side validation as well as using it to enforce MongoDB Schema Validation.
For this to work well we need to generate zod definitions for:
Maybe this is already possible in some way and I've missed how to configure it - but I feel both things would be very helpful to utilize this plugin to it's full potential! :)
The text was updated successfully, but these errors were encountered: