right now if i want to fetch a single user i have to use code like this
const { data, error } = await schoologyUsers.select().eq("email", email); if (!data) throw error; const user = data[0];
const { data, error } = await schoologyUsers.select().eq("email", email); if (!data) throw error; const user = data[0];
however this has some problems - boilerplatey - declares
data
data
and
error
error
so i can't use them again what's a better way to do this? (and yes thankfully this is inside of another reusable function, but i've had to do something like this a couple times)
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.