hasura / hasura/graphql-engine

Metadata field for session argument in functions is not documented

Open
#7,494 1 comment 1 reaction 0 assignees View on GitHub
c/docs
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

I had to dig into the codebase and make my best guess at how the metadata YAML should be for specifying a session argument to a custom-tracked function.

In general, figuring out the shape of these documents is not straightforward, and I think it could use a JSON-schema spec or be documented somewhere visible. For the record this is how to add it:

```sql
create or replace function search_foo(keyword text, h_session jsonb) returns public.foos as
$$
select * from foos;
$$ language sql stable;
```

```yaml
function:
name: search_foo
schema: public
configuration:
session_argument: h_session
permissions:
- role: customer
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.