Skip to content

[Feature request] Support for non-input types + variables #403

Closed
@robertherber

Description

@robertherber

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:

  • Non-input types as well - we need to cover all GraphQL types as a base for MongoDB Schema Validation (will probably use this or something similar)
  • I noticed zod definitions are not generated for variables directly specified in mutations. I think it'd help a lot to get these as well - I think it makes most sense to break out input types only when they reach a certain level of complexity.

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! :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions