You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a use case where I would like to be able to pass more than just a string as a directive argument. For example, if I have a directive designed to enforce uniqueness on arrays (in Zod), I would want to use the refine() method like so:
@elijaholmos Thanks for your suggestion!
I agree to accept this feature request. but this feature is difficult to treat in YAML configuration. Do you have any ideas?
graphql-codegen encourages the use of a typescript-based configuration by default, which naturally offers substantially more features than its yaml counterpart. We could perhaps simply not support this feature if a yaml configuration is present, as that would indeed be cumbersome to work with.
I have a use case where I would like to be able to pass more than just a string as a directive argument. For example, if I have a directive designed to enforce uniqueness on arrays (in Zod), I would want to use the
refine()
method like so:Translating this to typescript-validation-schema:
With my
CodegenConfig
defined in a TypeScript file: (https://the-guild.dev/graphql/codegen/docs/config-reference/codegen-config)However, that directive configuration yields the following error:
My request is that the typescript-validation-schema package can support receiving functions as arguments for custom directive definitions.
The text was updated successfully, but these errors were encountered: