Open bigman73 opened 2 years ago
This is very strange to me. Aliases should be outside our scope. It should be handled by the GraphQL engine. I don't see how it should be related to the schema and the resolvers that OtG generates.
Unfortunately, it will be quite some time before I come around to this. To be honest, I haven't had any time to work on this library at all even though I would like to. I definitely plan on working on OtG the first opportunity I have but for now, I do not know when I can look at this. Thank you very much for reporting the issue however!
Describe the bug When executing a query without an alias, to a given web api, there is a valid result. However, once the query is aliased then the result shows null, even though the underlying HTTP request is valid and the service is returning results.
Hypothesis: There seems to be a issue on the final output results mapping phase. Perhaps the library doesn't know how to handle aliases?
To Reproduce Given a functional query and service, for example: Service: https://www.boredapi.com/documentation#endpoints-random A sample query: http://www.boredapi.com/api/activity?type=recreational
OpenAPI specification: https://api.swaggerhub.com/apis/bigman73/bored-api-activity/0.2#/default/get_api_activity
Run the query in regular form, without an alias:
Result is valid: For example:
Run the query but this time with an alias (e.g., a):
Result is null
Expected behavior The output should be valid, not null
Screenshots![image](https://user-images.githubusercontent.com/5384551/130962509-c2deaed2-f24a-4ca4-8c97-e4678cc12069.png)