There should be a way to access session such as userid, role, etc. from functions via hml configuration. This is obviously quite important for connectors that are going to be accessing "private" or scoped information via external sources.
Engine Feature: https://hasurahq.atlassian.net/browse/V3API-14