hasura / hasura/graphql-engine
Hasura Session Variables in Native Queries
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Is your proposal related to a problem?
I would like to use Session variables in Native Queries.
This would allow us to create advanced filters on the SQL level.
### Describe the solution you'd like
I would like the same approach as in custom SQL functions:
https://hasura.io/docs/latest/schema/postgres/custom-functions/#accessing-hasura-session-variables-in-custom-functions
### Describe alternatives you've considered
I would create an SQL function as an alternative, but I like that approach less.
Contributor guide
Research direction
Start with the Native Queries implementation and the linked Hasura documentation on accessing session variables in custom SQL functions. Compare how session variables are exposed there with the native-query path, then define and verify equivalent SQL-level filtering behavior for native queries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, postgresql
- Domain
- backend-api-design, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100