I have a supabase setup on my weweb app but the thing is that the table i included in my collection cannot fetch any data but in database data is present so the problem is with collection config i guess, kindly help me out
Please tell us more, can you share the details of the Supabase Schema? Maybe a screenshot like this?
Also show us what filter are you using? From the provided data it can be anything from wrong setup to an active RLS rule. Thanks!
actually the issue is that the data’[s not getting fetched from database
What you’re fetching is a View, not a Table, (in the screenshot) I’m not sure how views work with Supabase Fetch. Is there data in the view? Maybe @alexis will be able to tell us more about the Supabase Views and WeWeb
I think you’re not getting any data because from your your view definition you can see it has no tables/rows. I think you might need to dive in some tutorial on how to create views/use Supabase as this might not be WeWeb’s fault.
See how it is supposed to look like (I’m fetching all the data from users_info table into my view view_users):
view_users view with the data
view_users definition (your’s is empty)
what I get into WeWeb
I’m attaching some resources on how to work with views in Supabase, even though you could do this with a simple query to the main table, depending on the kind of complexity that the view contains.
Hmm I don’t know, when I did this from Supabase, (the query to create a View) and then fetched it, it worked fine. It looks like your query from pgAdmin has not projected into Supabase or smth. But that’s only my guess. When you open the view in Supabase table editor, do you see the records?
If you can see the data via pgAdmin but not in your app it’s more than likely a privacy policy. You need to verify your rls, then log in as a user when in preview mode in your app. This will give the view from the context of a user whereas this software has the view of super admin
when we try to run query directly on supabase, it is getting timeout
this happens if we run query without any where clause
RLS (this is only my info) doesn’t apply on views, it’s a way to cheat RLS actually.
@mujtaba026 if you’re getting timed out when running where clause, maybe you could try to fetch collection without where? If it fetches, then you’ve found the thing that’s causing a problem.
we tried that but it didnt worked out for us
Then it might be a Supabase, not WeWeb problem.
Hi…myname ebongblues…i’m beginner on supabase…Sorry, have you given access rights (CRUD) to Configuration - Policies - Table-name ?created crud on configuration → policies - table