-
Notifications
You must be signed in to change notification settings - Fork 2.8k
add relationship name to generated order_by field names (fix #2981) #2998
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
Conversation
|
Deploy preview for hasura-docs ready! Built with commit b6c07fd |
|
Review app for commit ced467e deployed to Heroku: https://hge-ci-pull-2998.herokuapp.com |
|
Review app for commit 47819b5 deployed to Heroku: https://hge-ci-pull-2998.herokuapp.com |
|
Review app for commit 4c9bb58 deployed to Heroku: https://hge-ci-pull-2998.herokuapp.com |
|
Review app for commit b6c07fd deployed to Heroku: https://hge-ci-pull-2998.herokuapp.com |
|
Review app https://hge-ci-pull-2998.herokuapp.com is deleted |
Description
Fixes bug related to SQL generation while more than one aggregate order_by of different array relationships present in the query. For more details refer to issue #2981
Affected components
Related Issues
fix #2981
Solution and Design
In
selectSQL generation, all order_by s are marked with field nameorder_by. So, two aggregate order_bys from different array relationships are treated the same and their subqueries are merged. Hence,postgres query erroris being thrown.This PR generates order_by field names as
<relationshp-name>.order_byto distinguish between different relationships.Steps to test and verify
Follow the reproduction given in #2981 and make sure the query passes through
Limitations, known bugs & workarounds
N/A