Skip to content

Adding logic to handle "oneOf" for Zod #1006

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

ctriley
Copy link

@ctriley ctriley commented Mar 12, 2025

Fixes: #1003

oneOf is a directive in graphql --read here: https://www.apollographql.com/blog/more-expressive-schemas-with-oneof

The zod generator did not have the ability to handle this -- I'm not sure about the other generators.

This PR adds the ability for the zod generator to handle the oneOf directive (fixing a bug)

P.S. I recommend squashing -- some of these commits were WIP

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant