2020-02-13 20:38:23 +03:00
|
|
|
- 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:
|
2020-04-24 10:55:51 +03:00
|
|
|
- extensions:
|
|
|
|
internal:
|
|
|
|
error: unexpected response
|
|
|
|
response:
|
|
|
|
status: 200
|
|
|
|
body:
|
2020-02-13 20:38:23 +03:00
|
|
|
id: 1
|
2020-04-24 10:55:51 +03:00
|
|
|
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
|
2021-09-20 21:19:39 +03:00
|
|
|
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"
|
2020-04-24 10:55:51 +03:00
|
|
|
url: http://127.0.0.1:5593/create-user
|
|
|
|
headers: []
|
2021-10-13 03:28:51 +03:00
|
|
|
transformed_request:
|
2020-04-24 10:55:51 +03:00
|
|
|
path: $
|
|
|
|
code: unexpected
|
2022-05-31 08:22:46 +03:00
|
|
|
message: expecting array for the action webhook response
|
2020-02-13 20:38:23 +03:00
|
|
|
- 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
|