jaitaiwan
05/12/2022, 1:51 AMedgaras
05/12/2022, 1:58 AMjaitaiwan
05/12/2022, 2:09 AMjaitaiwan
05/12/2022, 2:10 AMedgaras
05/12/2022, 2:10 AMedgaras
05/12/2022, 2:45 AMjaitaiwan
05/12/2022, 3:11 AMjaitaiwan
05/12/2022, 3:12 AMdipesh
05/12/2022, 6:20 AMonAuthStateChange
function is triggered when I change tabs. For example, If I have my supabase application open in TAB1 and facebook app open in TAB2. When I visit facebook in TAB2 and come back to my supabase application on TAB1, onAuthStateChange
function gets triggered.
How do I turn this off?Sanctus
05/12/2022, 6:47 AMjaitaiwan
05/12/2022, 6:59 AMMac
05/12/2022, 6:29 PMsnapshots
and tracks
. They're connected in a many-to-many relationship via a join table called snapshots_tracks
. Apart from containing proper foreign keys, it has two extra columns named added_at
and position
.
Now, I'm using the JavaScript SDK to find a snapshot
with an id equal to given snapshotId
, but I'd like my response to include a tracks
array with each track containing the aforementioned properites as well as all the other `tracks`' columns.
While I'm aware that PostgREST is capable of detecting M-M relationships, I couldn't quite figure out how to craft a query described above. Here's what I have so far:
ts
const { data } = await supabase
.from<Snapshot>('snapshots')
.select(
`
id,
captured_at,
description,
num_followers,
tracks(*)
`
)
.throwOnError(true)
.eq('id', snapshotId)
.limit(1)
.single();
garyaustin
05/12/2022, 9:25 PMF0rce
05/13/2022, 3:57 PMkonga
05/13/2022, 10:25 PMERROR: schema "auth" does not exist
konga
05/13/2022, 10:27 PMpostgresql://postgres:postgres@localhost:54322/postgres
I was reading somewhere about different params you can add to the url, but I didn't understand.konga
05/13/2022, 10:28 PMnpx prisma migrate dev
this is the command that I rankonga
05/13/2022, 11:24 PMits-pablo
05/14/2022, 1:53 AMjaitaiwan
05/14/2022, 11:37 PMkonga
05/14/2022, 11:38 PMhoesmean
05/15/2022, 8:33 PMlaznic
05/15/2022, 8:44 PMlisting
is undefined. You probably want to use the id
you've destructed from route.params
instead of listing.id
since it seems that listing
should contain the data you have fetched from SupabaseXzeta
05/17/2022, 3:51 AMconst fetchProfile = async () => {
try {
const { data, error } = await client
.from<ProfileType>("profiles")
.select("*")
.eq("username", username)
.single();
if (error) throw error;
setProfile(data);
} catch (error) {
setError(error);
}
};
Argument of type 'unknown' is not assignable to parameter of type 'SetStateAction<Error | null>'
bjorgen
05/18/2022, 12:13 AMkonga
05/20/2022, 6:43 PMconst { user, session, error } = await supabase.auth.signUp({
email: 'example@email.com',
password: 'example-password',
})
I have set the anon and supabase url and it works because I can hit the regular rest api. When I use the the auth function, it calls the wrong endpoint.
http://localhost:3000/undefined/auth/v1/signup
It should be calling the supabase url and instead of
http://locahost:3000/undefined
konga
05/20/2022, 9:48 PMchrisb2244
05/21/2022, 2:20 AMgaryaustin
05/21/2022, 2:46 AMkavla
05/21/2022, 9:24 PM