4 YEARS AGO
Create a new WixDataQuery object from JSON
I would like the UI to contain widgets that the user interacts with to set filters for a query, but I would like to run the query on the backend.
This is useful for a few reasons:
1. Performance - I've timed my query. At its very worst (return all items in the collection), the query takes 10 seconds if you do it on the frontend, and 2 seconds if you do it on the backend.
2. Data Size - I would like to pare down the data to only a few fields in the collection, and then send a much smaller object to the client. This is useful on mobile. Right now, the amount of data that comes back from the query is crashing the mobile browser. Additionally, data/bytes aren't free on mobile so it would be great to be able to optimize this.
3. Security - If I want to do something like suppressAuth, I really SHOULD only run the query on the backend
The communication between the frontend and the backend is done by serializing objects to JSON. However, wixData has no ability to deserialize JSON into a known TYPE, like a WixDataQuery object once it's received by backend code.
Pending
API
1 Votes
Top Requests
-
Lorem Ipsum.
-
Lorem Ipsum.
-
Lorem Ipsum.
-
Lorem Ipsum.
Log in to your Wix account to leave a comment
Thanks for posting! Your comment will be shown once it’s reviewed.
Comments
Add your comments and suggestions here.