hasura / hasura/graphql-engine

hasura_session invocation without arguments

Open
#4,537 5 comments 0 reactions 0 assignees View on GitHub
c/server k/question
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

There is a function:

```
CREATE OR REPLACE FUNCTION public.drops(cases_free_row cases_free, hasura_session json)
RETURNS SETOF drops
LANGUAGE sql
STABLE
AS $function$
SELECT *
FROM drops d
WHERE d.caseid = cases_free_row.id
AND d.userid = (hasura_session ->> 'x-hasura-user-id') :: INT
$function$
```
When I try to call, I need to enter the arguments

```
{
"errors": [
{
"extensions": {
"path": "$.selectionSet.cases_free.drops.args",
"code": "not-supported"
},
"message": "Non default arguments cannot be omitted"
}
]
}
```
**Hasura v1.2.0-beta.4**

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.