FlutterFlow question API/query

Is anybody experienced with FlutterFlow here? I have a performance question. Maybe some web/API expert can also chime in even if you’re not using FlutterFlow.

I have a Supabase view which I’d like to access from FlutterFlow. The view has a few columns and I’d like to filter on one of these columns. There are two (simple) ways of doing it:
1- a query in FlutterFlow setting a filter on this column in FlutterFlow
2- an API call in FlutterFlow using the filter on this column as a query parameter.

My understanding is that with option #1, FlutterFlow would request the full dataset and then filtering out the rows according to my filter. Option #2 would instead only request the filtered rows. So I would think #2 would be faster.

What would you guys say?

Depends on the API. But normally the API is faster in that case. I would anyhow use the API while it is something you can implement faster and that’s it

Personally I’d go for #2 and filter the data at the source instead of grabbing everything and then filtering locally

Esp if the filter might eliminate a LOT of the data from view

No point transferring lots of data just to not show it

Now the life side is that this could cause more round trips - if you HAVE all the data locally and can filter instantly locally then there may be no round trips

I’d start with # 2 and IF round tripping is an issue switch to # 1, hold the data locally, and filter as you want

BUT with this data could get “stale” (ie the back end could get new data that you are interested in but you dont refetch it all the time - that however can be detected and dealt with)

1 Like

Thank you!

Can we send query parameters to Supabase from FlutterFlow?

Yes, that’s possible. With the parameter’s value either a fixed value or a variable.

Can you point me to any document or tutorial on this please?

https://youtu.be/22fuYHe0ZZU

I can’t tell if this is a good tutorial or not because I haven’t watched one on API calls. The API calls are pretty self explanatory in FlutterFlow.