mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-22 23:11:41 +03:00
cd0f674821
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3661 GitOrigin-RevId: bc37e7aa0cb861069536aa97aa4dff1fdc05e08b
84 lines
2.1 KiB
YAML
84 lines
2.1 KiB
YAML
- description: Update actions webhook to another route which retuns object response
|
|
url: /v1/query
|
|
status: 200
|
|
response:
|
|
message: success
|
|
query:
|
|
type: update_action
|
|
args:
|
|
name: create_users
|
|
definition:
|
|
kind: synchronous
|
|
arguments:
|
|
- name: email
|
|
type: String!
|
|
- name: name
|
|
type: String!
|
|
output_type: '[UserId]'
|
|
handler: http://127.0.0.1:5593/create-user
|
|
|
|
- description: Run create_users action
|
|
url: /v1/graphql
|
|
status: 200
|
|
query:
|
|
query: |
|
|
mutation {
|
|
create_users(email: "clarke@gmail.com", name: "Clarke"){
|
|
id
|
|
user {
|
|
name
|
|
email
|
|
is_admin
|
|
}
|
|
}
|
|
}
|
|
|
|
response:
|
|
errors:
|
|
- extensions:
|
|
internal:
|
|
error: unexpected response
|
|
response:
|
|
status: 200
|
|
body:
|
|
id: 1
|
|
headers:
|
|
- value: application/json
|
|
name: Content-Type
|
|
- value: abcd
|
|
name: Set-Cookie
|
|
request:
|
|
body:
|
|
session_variables:
|
|
x-hasura-role: admin
|
|
input:
|
|
email: clarke@gmail.com
|
|
name: Clarke
|
|
action:
|
|
name: create_users
|
|
request_query: "mutation {\n create_users(email: \"clarke@gmail.com\", name:\
|
|
\ \"Clarke\"){\n id\n user {\n name\n email\n is_admin\n\
|
|
\ }\n }\n}\n"
|
|
url: http://127.0.0.1:5593/create-user
|
|
headers: []
|
|
transformed_request:
|
|
path: $
|
|
code: unexpected
|
|
message: expecting array for the action webhook response
|
|
- description: Revert action definition
|
|
url: /v1/query
|
|
status: 200
|
|
response:
|
|
message: success
|
|
query:
|
|
type: update_action
|
|
args:
|
|
name: create_users
|
|
definition:
|
|
kind: synchronous
|
|
arguments:
|
|
- name: users
|
|
type: '[UserInput!]!'
|
|
output_type: '[UserId]'
|
|
handler: http://127.0.0.1:5593/create-users
|