Realtime event with complex query

On initial page load, the following query is executed:
await supabase
.from('collections')
.select("*, items(*), collection_share!inner(shared_with, can_edit)")
.eq("collection_share.shared_with", sharedWithId)


I wish to receive query results like the query above, when an insert event occurs for table collection_share.
How can I achieve this?
Was this page helpful?