operator does not exist jsonb ? uuid

I am getting this exception when trying to add a policy that checks if participants are part of transaction. participant is a jsonb array string. it works if i hardcode auth.uid() though.

create or replace function public.get_transactions_for_authenticated_user( user_id uuid)
returns setof bigint
language sql
security definer
set search_path = public
stable
as $$
    select id from transactions where participants::jsonb  ? auth.uid()
$$;

any pointers?
Was this page helpful?