-
Notifications
You must be signed in to change notification settings - Fork 211
feature request: handle inconsistent/incompatible schema #248
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
Comments
@tirumaraiselvan Thanks for the suggestion! I think you make some fair points. I can see two possibilities right now. As we are translating each operation, if we encounter a schema that we cannot process, we can 1) simply skip the operation or 2) default to GraphQL JSON type and treat the schema and the field like a black box. The first option should be a lot easier the implement than the second option. The second option involves trying to coordinate between the schema and the resolver builders. What are your thoughts? I'm sorry I still haven't finished |
I was thinking of the first. I am not sure I understand the full implications of second. Also this kind of logic can extend to resolving "inconsistent openapi schemas", say something which has missing/bad definition etc but that's not the most imp use-case IMO. |
Related to IBM#197 and IBM#248 Signed-off-by: Alan Cha <[email protected]>
Related to #197 and #248 Signed-off-by: Alan Cha <[email protected]>
any progress? I got same issue, UnhandledPromiseRejectionWarning with "oneOf" |
@kargalskaya I'm making slow progress on my branch (it's also messy because I'm trying out different things) but still a work in progress. Would love if people wanted to help out on the effort as there are a lot of people who are interested in the fix but it's still quite a complex problem so I wouldn't be sure how to organize it. |
@tirumaraiselvan @kargalskaya We finally have a fix for this problem! Update to v2.0.0 and take a look at this post! |
Since there are lot of constructs in OpenAPI that do not map well to GraphQL like
anyOf
,allOf
etc, openapi-to-graphql fails to launch on such schemas.Instead of failing to launch, is it possible to "drop" parts of the schema which cannot be resolved and throw warnings that these parts are dropped. This can be enabled through a flag like
--drop-incompatible-schema
or something.This will allow users with schemas like Stripe etc to get access to many APIs in GraphQL which might be enough for their use-case.
The text was updated successfully, but these errors were encountered: