-
Notifications
You must be signed in to change notification settings - Fork 211
Using schema name that doesn't exist in OAI spec when calling query #127
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
IIRC, at some point, I was using |
@dhmlau The behavior is expected. OASGraph attempts to base field names on the return types of operations. Because, in your OAS, multiple operations return the If you want more control, consider using the |
@ErikWittern I took a very brief look at this yesterday and if I recall correctly the However, if you cannot wait, @dhmlau, please consider using the |
I took a look at @ErikWittern, you are correct. I wasn't sure if arrays had a different mechanism of creating a field name than objects so I went back to check and it turned out to be same. So just to reiterate, this behavior is expected and it is because multiple operations return a type that share the same type name (which is used for the query field names). We could try to make it so that OASGraph tries to give nice looking type names to GET operations (in this case For now, please consider using the |
@Alan-Cha @ErikWittern , thanks for looking into this. I think my main concern is that the field name has changed from |
@dhmlau Ah, if this is about consistency, then I do not think this issue is resolved. Many seemingly extraneous factors can affect the resulting GraphQL interface. We are looking into this issue with #120. I would hold off on updating the docs for now and I will try to resolve this as soon as possible. |
Describe the bug
After creating a ToDo application using LoopBack, here is the OpenAPI spec:
openapi.txt
In the GraphQL explorer, the correct query is
instead of
I'm wondering where is the
todos2
is coming from? It doesn't seem to be matching the schema name or the endpoints.The text was updated successfully, but these errors were encountered: