Skip to content
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

oneOf is not properly exported to graphql-core library #3508

Open
colonelpanic8 opened this issue May 22, 2024 · 1 comment
Open

oneOf is not properly exported to graphql-core library #3508

colonelpanic8 opened this issue May 22, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@colonelpanic8
Copy link

colonelpanic8 commented May 22, 2024

The fact that an input is a oneOf type is not properly exported to the graphql-core library that strawberry sometimes uses internally. This is probably partly because that library does not really represent oneOf itself.

I generate schema files from this output, which kind of causes problems given that the @OneOf directive is missing.

I have a fix that works for my purposes with these branches in strawberry and graphql-core:

https://github.com/colonelpanic8/strawberry/tree/ivan/support-one-of-export

https://github.com/colonelpanic8/graphql-core/tree/add_is_one_of_property

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@colonelpanic8 colonelpanic8 added the bug Something isn't working label May 22, 2024
@patrick91
Copy link
Member

@colonelpanic8 hi! can you show me an example of generated schema? I think I covered this case 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants