-
Notifications
You must be signed in to change notification settings - Fork 2.8k
bulk query should not care about access mode of select or count queries #3467
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
bulk query should not care about access mode of select or count queries #3467
Conversation
|
Deploy preview for hasura-docs ready! Built with commit e0cbe33 |
|
Review app for commit d5eb012 deployed to Heroku: https://hge-ci-pull-3467.herokuapp.com |
| onLeft (reconcileAccessModes expectedMode queryMode) $ \errMode -> | ||
| throw400 BadRequest $ | ||
| "incompatible access mode requirements in bulk query, " <> | ||
| "expected access mode: " <> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hindent auto formatting
17ba975 to
107c766
Compare
|
Review app for commit 107c766 deployed to Heroku: https://hge-ci-pull-3467.herokuapp.com |
|
Review app for commit e0cbe33 deployed to Heroku: https://hge-ci-pull-3467.herokuapp.com |
|
Review app https://hge-ci-pull-3467.herokuapp.com is deleted |
Description
Fixes the TODO in #3191 and fixes the commented code in #3465
As RQSelect and RQCount statements could be combined with run_sql queries which mutate data, we had set the tx access mode for them to be READ WRITE to support backwards compatibility in the console.
But the console is doing lots of RQSelect alongside READ ONLY run_sql, which forces the console to continue using run_sql in READ WRITE. This would negate the performance benefit of READ ONLY run_sql in the first place.
This PR fixes that by making RQSelect and RQCount work with both types of access modes.
Affected components