-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Add readable terms for the operators #3699
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 ed6d2df |
|
Review app for commit 061ff70 deployed to Heroku: https://hge-ci-pull-3699.herokuapp.com |
061ff70 to
17ce506
Compare
|
Review app for commit 17ce506 deployed to Heroku: https://hge-ci-pull-3699.herokuapp.com |
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.
- Lets change the operator name to be of the format -
[<graphql equivalent operator>] logical name. e.g.[_eq] equals. The $eq value (that is used by the v1/query request underneath) is not helpful to the user - Lets only display the operator name after doing the above
- ilike -> like (case-insensitive) for clarity
It would also be great if we could somehow indicate that like and ilike expect values such as %search-term% to search anywhere. Maybe preset the value field with %% when they are selected?
|
Review app for commit 0542286 deployed to Heroku: https://hge-ci-pull-3699.herokuapp.com |
rikinsk
left a comment
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.
I was just testing this out and realised we have another bug that we can resolve here.
For _in & _nin, we cast the value to string and the query breaks. The typecasting needs to be handled for them.
Also it might make sense add the default value as another field in the Operators constant itself so that we can keep adding other defaults easily. For example, for _in & _nin we can add default as empty array.
| { name: 'not like', value: '$nlike', graphqlOp: '_nlike' }, | ||
| { name: 'like (case-insensitive)', value: '$ilike', graphqlOp: '_ilike' }, | ||
| { | ||
| name: 'not ilike (case-insensitive)', |
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.
not ilike -> not like
| graphqlOp: '_nilike', | ||
| }, | ||
| { name: 'similar', value: '$similar', graphqlOp: '_similar' }, | ||
| { name: 'not similar', value: '$nsimilar', graphqlOp: '_similar' }, |
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.
_similar -> _nsimilar
|
I handled the |
|
Review app for commit 0d485a0 deployed to Heroku: https://hge-ci-pull-3699.herokuapp.com |
|
Review app for commit 34e8782 deployed to Heroku: https://hge-ci-pull-3699.herokuapp.com |
|
Review app https://hge-ci-pull-3699.herokuapp.com is deleted |
|
Review app for commit ed6d2df deployed to Heroku: https://hge-ci-pull-3699.herokuapp.com |
Description
In Browse rows, there were listed postgres operators. This PR adds readable english terms and the operator in brackets so that anybody can understand it quickly.
Affected components
Breaking changes