Supabase collection parameters

Hi everyone,

I’m trying to move from Xano to Supabase with WeWeb. One of the things I’m missing is possibility to pass parameters to Supabase collection as I can do with Xano or REST API (or I can’t find the way to add it). Right now I have to create the variable bind it to the filter in Supabase plugin, change its value and refresh the Supabase collection and reset its value. This is not a very convenient way of doing things and make actions longer… I thing that possibility of passing parameters directly to the plugin will make life much easier.

The other thing is about Real Time Tabes. After enabling Realtime Table and set up sorting in Supabase Plugin, added rows (records) don’t reflect sorting - they appear on the very end of the collection. In order to sort it properly you have to Fetch the collection (which cannot be done automatically due to lack of appropriate No-Code actions) or apply sorting on the front end which is problematic when using paginated data. This complicates the logic unnecessarily and forces to use client side sorting which is not always a good idea.

Dominic

Sorry I’m not sure to understand what you can do with Xano and Rest API and can’t with supabase ?

What’s the parameters you’re talking about ? Can you show me with some captures ?

After enabling Realtime Table and set up sorting in Supabase Plugin, added rows (records) don’t reflect sorting

We will take core of fixing this behavior in the next supabase release, thanks for your report :slight_smile:

My suggestion is to allow adding parameters to Supabase collection like we can do in Workflows.
image

These parameters could be used in filters or sorting in collection settings.

Now in Action flow we can only SELECT the whole Supabase collection. Allowing to pass the parameter from the Action Flow (As we can in REST API or Xano with Headers) would greatly simplify the application and eliminate the need of using variables to achieve this.

You can bind the filters directly to a variable in the collection setup (your second screenshot) and then after changing the variable (meaning you change parameters of your query) you will refetch the collection. This way you apply the new parameters

1 Like

Broberto I just do it this way now :slight_smile: I just thought it could be much simpler …

You can make a workflow to wrap this logic with parameters and use those to change the variable, if you want to get as close to reusable stuff

Hi, this is not the direction we are taking.

What you should use is the Select action from the supabase plugin. What we plan to do is to implement filters and more on the select action.

2 Likes