Combining AND and OR statements

Hello, im trying to make a query from react native to supabase, with the logic of having a query lke this: "Select * from table where (requester_id = id and requestee_id = another_id) OR (requester_id = another_id and requestee_id = id)".. i did something like this:
 const {data, error} = await supabase
        .from(table)
        .select()
        .or(
            `requester_id.eq.${requester_id},and(requestee_id.eq.${requestee_id})`
            )
        .or(`requester_id.eq.${requestee_id},and(requestee_id.eq.${requester_id})`)
and this provides wrong results. what would be the correct js code for this?
Was this page helpful?