Improve select all query serialization
When the "Select All" feature is used and an action is triggered, we need to reconstruct the complete
querywithin the action request.
Since the
querymight include various filters and custom elements, it’s not simple to rebuild it during the action request. To handle this, we serialize and encrypt the entire query (for security) before passing it along with the action request. (An alternative approach could be to only serialize when "Select All" is pressed, but that’s a discussion for another time.)
We’re always open to feedback and suggestions for improvement.
One alternative might be to extract all the IDs from the query, encrypt them as an array, and then retrieve the records using those IDs.
Originally posted by @Paul-Bob in https://github.com/avo-hq/avo/issues/3151#issuecomment-2298865948
One alternative might be to extract all the IDs from the query, encrypt them as an array, and then retrieve the records using those IDs.
This approach is not suitable for scaling (millions of IDs may break it)
For now, let's make some DX improvements:
### Tasks
- [ ] Add FAQ about why the `query` is serialized
- [ ] Custom error with a link to FAQ when serialization breaks (on development)
- [ ] Add option to disable select all feature