mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-19 13:31:43 +03:00
1e1a36a192
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
89 lines
2.3 KiB
YAML
89 lines
2.3 KiB
YAML
- description: Update actions webhook to another route which retuns array response
|
|
url: /v1/query
|
|
status: 200
|
|
response:
|
|
message: success
|
|
query:
|
|
type: update_action
|
|
args:
|
|
name: create_user
|
|
definition:
|
|
kind: synchronous
|
|
arguments:
|
|
- name: users
|
|
type: '[UserInput!]!'
|
|
output_type: UserId
|
|
handler: "{{ACTION_WEBHOOK_HANDLER}}/create-users"
|
|
|
|
- description: Run create_users sync action
|
|
url: /v1/graphql
|
|
status: 200
|
|
query:
|
|
query: |
|
|
mutation {
|
|
create_user(users: [{email: "blake@hasura.io", name: "Blake"}, {email: "elsa@hasura.io", name: "Elsa"}]){
|
|
id
|
|
user {
|
|
name
|
|
email
|
|
is_admin
|
|
}
|
|
}
|
|
}
|
|
|
|
response:
|
|
errors:
|
|
- extensions:
|
|
internal:
|
|
error: unexpected response
|
|
response:
|
|
status: 200
|
|
body:
|
|
- id: 1
|
|
- id: 2
|
|
headers:
|
|
- value: application/json
|
|
name: Content-Type
|
|
- value: abcd
|
|
name: Set-Cookie
|
|
request:
|
|
body:
|
|
session_variables:
|
|
x-hasura-role: admin
|
|
input:
|
|
users:
|
|
- email: blake@hasura.io
|
|
name: Blake
|
|
- email: elsa@hasura.io
|
|
name: Elsa
|
|
action:
|
|
name: create_user
|
|
request_query: "mutation {\n create_user(users: [{email: \"blake@hasura.io\"\
|
|
, name: \"Blake\"}, {email: \"elsa@hasura.io\", name: \"Elsa\"}]){\n\
|
|
\ id\n user {\n name\n email\n is_admin\n }\n\
|
|
\ }\n}\n"
|
|
url: "{{ACTION_WEBHOOK_HANDLER}}/create-users"
|
|
headers: []
|
|
transformed_request:
|
|
path: $
|
|
code: unexpected
|
|
message: got array for the action webhook response, expecting UserId
|
|
- description: Revert action definition
|
|
url: /v1/query
|
|
status: 200
|
|
response:
|
|
message: success
|
|
query:
|
|
type: update_action
|
|
args:
|
|
name: create_user
|
|
definition:
|
|
kind: synchronous
|
|
arguments:
|
|
- name: email
|
|
type: String!
|
|
- name: name
|
|
type: String!
|
|
output_type: UserId
|
|
handler: "{{ACTION_WEBHOOK_HANDLER}}/create-user"
|