cdro
04/28/2022, 4:43 PMconst { data, error } = await supabase
.from<definitions['event_verifier']>('event_verifier')
.select('id,address, createdAt, verifiedAt, event:eventId (id, slug)', { count: 'exact' })
.eq('event.slug', slug);
What I am noticing is that records that don’t pass the eq
are still returned, with that field set to null.
{
id: 'f5547b29-4820-4e95-ade5-df6dfbcc07f8',
address: '0x9372Eb1DfF66859B9e8D05D6014F5d1d87d031c4',
createdAt: '2022-04-23T19:56:01.486799+00:00',
verifiedAt: null,
event: null
},
I have to take an additional step here and filter through the result to make sure that an event object is there.
Is there a way to omit the return result entirely if .eq('event.slug', slug)
doesn’t pass?Needle
04/28/2022, 4:43 PM/title
command!
We have solved your problem?
Click the button below to archive it.Scott P
04/28/2022, 4:49 PMNeedle
04/28/2022, 4:49 PMLennart
04/28/2022, 9:14 PMcdro
04/29/2022, 1:53 AMNeedle
04/29/2022, 1:53 AM