© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
13 replies
Corentin_dev

row level security and react query

Hi,

I am using react query on a side project.

When I login and land on the dashboard, I have a table with item coming from a Supabase table.
This table a RLS to display only row from the auth user (auth.uid() = user_id)

But, when the query run for the first time, I get the empty array (RLS block). Nevertheless, when i leave the window and come back (so that react query refetch the data) I do get the data.

I tried to add a a enable option to pause if there is no user but the user is present at the first query..
I am understand why I don't get the data for the first time

Thanks in advance for your help !
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Row level security and data insert with react native
SupabaseSSupabase / help-and-questions
4y ago
ROW LEVEL SECURITY ISSUE
SupabaseSSupabase / help-and-questions
3y ago
Help with row level security
SupabaseSSupabase / help-and-questions
12mo ago
Row level security; data returns null with join query
SupabaseSSupabase / help-and-questions
4y ago