graphql-engine/server/tests-py/queries/actions/metadata/create_with_headers.yaml
Rakesh Emmadi cfd7944849
restrict env variables start with HASURA_GRAPHQL_ for headers configuration in actions, event triggers & remote schemas (#5519)
* restrict env variables start with HASURA_GRAPHQL_ for headers definition in actions & event triggers

* update CHANGELOG.md

* Apply suggestions from code review

Co-authored-by: Vamshi Surabhi <0x777@users.noreply.github.com>
2020-08-05 18:44:53 +05:30

22 lines
591 B
YAML

description: Define an action with headers configuration
url: /v1/query
status: 400
query:
type: create_action
args:
name: create_user_1
definition:
kind: synchronous
arguments:
- name: name
type: String!
output_type: User!
handler: http://127.0.0.1:5593/create-user
headers:
- name: x-client-id
value_from_env: HASURA_GRAPHQL_CLIENT_NAME
response:
path: $.definition.headers[0]
error: 'env variables starting with "HASURA_GRAPHQL_" are not allowed in value_from_env: HASURA_GRAPHQL_CLIENT_NAME'
code: parse-failed