graphql-engine/server/tests-py/queries/actions/metadata/create_with_headers.yaml
Samir Talwar 1e1a36a192 server/tests-py: Use environment variables for services in queries.
I'm trying to shore up the Python integration tests to make them more reliable. In doing so, I noticed this.

---

Rather than hard-coding hostnames and ports, we can (and already do) inject these into the HGE process using environment variables.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5255
GitOrigin-RevId: 6bb593999ece42cedef6619f31f9d9b2e39f30ef
2022-08-03 20:05:46 +00:00

22 lines
598 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: "{{ACTION_WEBHOOK_HANDLER}}/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