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

[NEED FEEDBACK] Generation of unions for oneOf return types in responses #331

Open
ftatzky opened this issue Jun 22, 2020 · 1 comment
Open

Comments

@ftatzky
Copy link

ftatzky commented Jun 22, 2020

Hey guys, first of all amazing library. We use your library at work to generate GraphQL types for our internal Swagger APIs. We have pretty huge schemas at our company and some of them rely on the usage of oneOf for polymorphism in responses.

I created a pull request with my current changes and as you can see in #330 it now correctly generates unions for oneOf responses. It took a lot of effort on my behalf to figure out where to apply even these small changes and now I'm kinda stuck. My changes are probably a bit naive, so I'm reaching out and asking for your help and feedback to get this change into your library. :)

I already tested this change against our internal .yaml which is about 2500 lines and everything was generated without a problem. So I'm pretty confident it's "ok". Still...

What am I probably missing, that could break this? What tests do I have to add if any? I'm really looking forward to your response, because we are in need of that feature to continue using your library.

Thanks in advance and best regards
Flo

@Alan-Cha
Copy link
Collaborator

@ftatzky Thank you so much for your kind words! It is always very exciting to hear from our users! And to hear that you are using our tool on large production schemas is also very cool!

I took a look at your PR and also did some of my own investigation. This is definitely a problem that needs to be resolved. I'll provide more feedback in the PR.

I apologize if our code base is difficult to navigate! We've tried our best to provide plenty of comments but unfortunately, the task of wrapping REST APIs in GraphQL is still quite a complex one. I'm curious about your experience however, trying to understand our source code, and also if you have any ideas on how we can make it easier for people to learn our code base.

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

No branches or pull requests

2 participants