I had a similar issue where I was getting the correct values when i wrote the query directly in supabase, but when i tried to run it locally it wouldnt retrieve anything. For me it was because of it being related to the row-level security policy set. Wanted to post just in case someone else got the same issue. My first time commenting here on stackoverflow