Optimization Tips
Last updated
Last updated
When using the Supabase.js plugin, you can set it up in a way that you can specify what data you wish to return. By doing so you can greatly speed up Data retrieval and decrease bandwidth and cost.
Let's say we have an Admin to manage our blog posts. We'd like to create a Repeating Group to have an overview of our articles. Since we don't need every value for that we can setup the plugin to return only certain values:
With this setup we only return the data we actually want to use inside my repeating group, like title, unique_id, created_at, thumbnail.
We can also return the referenced Category's name just to show it visually as well.
Once we have all this data, let's setup a workflow where if we click on one of the posts, it redirect us to another page or part of the app where we can actually edit all of the data of the single post.
Now that we only need to return a single post we can actually return all of the data like so:
Here we return all the fields of the post, and also all the fields for the related category. Make sure you've set it up properly the same with this guide.