Milou
03/26/2022, 6:47 PMNeedle
03/26/2022, 6:47 PM/title
command!
We have solved your problem?
Click the button below to archive it.Milou
03/26/2022, 6:49 PMts
getQuestion(id : string) : Observable<any> {
return from(this.supabase.from('question').select('*').eq('id', id).single())
}
in my supabase-service.ts
But this is annoying as the result returned is some weird Observable/postgres-result-like object. What i'd much rather have, would be for the function to either return the complete, typesafe data from the request, for example by using an interface or object definition and instantiating it, or throw errors if the request failed.Milou
03/26/2022, 6:50 PMMilou
03/26/2022, 6:56 PMScott P
03/26/2022, 7:59 PMNeedle
03/26/2022, 7:59 PMScott P
03/26/2022, 8:01 PMsupabase.from<definitions['question']>('question').select('*').eq('id', id).single()
Milou
03/27/2022, 3:43 AM