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
Generated GraphQL Schema fails to be parsed due to aggregateTables empty Name fields #96
Comments
Hi @metafeather really appreciate for the pull request for fixing this. This is a slightly more trivial issue then just setting the name there, and hence the reason why its pending. The aggregate API is not supposed to send items which represent the original table, but instead the columns will depend on what the query was. For example, consider a scenario where you run an aggregate over the {
"count": 5,
"date": "2020-01-01"
} While the real user_account object defined in graphql does not have that column. So while this addition from your pull request will make that API more visible, the response object would still not show up the real fields available in response (so things like auto-complete in graphql editors won't work) I am trying to figure a reliable and intuitive way to expose this. |
Btw, please do mention if you have any presupposition around using such API in graphql (where the resulting columns are based on the query itself), or if you have come across something similar in another API. |
|
This seems a known/unfinished issue based on the commented 'Name' field in the code noted below, but I was hoping it could be addressed as it would greatly ease the discovery of the graphql endpoints generated by the db tables as they would become available in GraphiQL in #13
https://github.com/daptin/daptin/blob/bc7fcee76cb4eccc1728cf31c408d4a0c4bac9c4/server/graphql.go#L503
Currently I am using a manual solution to enter the aggregate tables relevant list type into the introspection JSON so an SDL can be generated for Postman, e.g. aggregateWorld = world, aggregateUserOtpAccount = user_otp_account, etc
The text was updated successfully, but these errors were encountered: