Weird things in the weweb data object for my supabase collection

i am setting up a collection from supabase
i have set a limit of 25
my DB has 450 records total that satisfy the query
my query returns all 450 records
when i access the query.data array, there are a BUNCH of null object. 425 in fact. then 25 objects of data at the end of the array.

the only way I can limit or paginate successfully with supabase is by making the API calls myself as shown here.

Hey Jared,

Ok this is weird indeed. Can you open a bug ticket here?

Just reported it to the team as well but if you open a ticket, you’ll be able to track its progress in real time :slight_smile:

ok. so an update would be that:

i opened the dev console → network tab

the response for my request is in fact only 50 objects

SO the weird thing is all the nulls in the array. they dont actually exist.

they seem more like placeholders.

Yep, that’s what I suspected but it’s still a problem because it’s slowing you down in the editor so not a pleasant experience. The team will look into it for sure. We’ll keep you posted!

Joyce, this seems to be widespread, it has messed up many of my formulas while trying to troubleshoot!

Hi @RCS, this is not widespread. It is an issue specific to the Supabase data source plugin and does not affect formulas.

1 Like

Yeah they are placeholder because of how our collection engine works.

You have to bind the collection and not collection->data to access only the items from your current page

2 Likes

Hello. I have the same problem here here. I am using the collection, and not the collection → data… Is there any update on the bug?

Not a bug. When a collection is paginated we create an array containing as many items as you have on the unpaginated collection, then we fill it with null values and only the current page get fetched. It’s required for our internal logic to work. Then you have to bind the collection and not collection->data, you should receive an array containing only the data related to the current page