hasura / hasura/graphql-engine
$response.status NOT AVAILABLE in response_template
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Version Information
Server Version: v2.25.0-ce
CLI Version (for CLI related issue): 2.29.1 (latest)
### Environment
docker image hasura/graphql-engine:v2.25.0-ce
### What is the current behaviour?
Error message in hasura log when you place {{$response.status}} in response_template
### What is the expected behaviour?
expect it to return a code e.g. 200, 400, 401
### How to reproduce the issue?
Excerpt of code from actions.yaml
response_transform:
body:
action: transform
template: |-
{
"result": "{{response.status}}"
}
template_engine: Kriti
version: 2
### Please provide any traces or logs that could help here.
"error":"Response Transformation Failed","internal":[{"error_code":"Name Error","message":"Variable 'response' not in scope","source_position":{"end_column":24,"end_line":1,"start_column":16,"start_line":1}}]
Contributor guide
Assessment
This issue has not been assessed yet.