2020-02-13 20:38:23 +03:00
|
|
|
type: bulk
|
|
|
|
args:
|
2021-01-06 19:06:24 +03:00
|
|
|
|
2020-02-13 20:38:23 +03:00
|
|
|
- type: run_sql
|
|
|
|
args:
|
|
|
|
sql: |
|
|
|
|
CREATE TABLE "user"(
|
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
name TEXT NOT NULL,
|
|
|
|
email TEXT NOT NULL,
|
|
|
|
is_admin BOOLEAN NOT NULL DEFAULT false
|
|
|
|
);
|
2021-01-18 09:56:25 +03:00
|
|
|
CREATE TABLE "article"(
|
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
name TEXT NOT NULL,
|
|
|
|
user_id INTEGER
|
|
|
|
);
|
|
|
|
INSERT INTO "article" (name, user_id) VALUES
|
|
|
|
('foo', 1),
|
|
|
|
('bar', 1),
|
|
|
|
('bar', 1),
|
|
|
|
('baz', 2);
|
2020-02-13 20:38:23 +03:00
|
|
|
|
|
|
|
- type: track_table
|
|
|
|
args:
|
|
|
|
name: user
|
|
|
|
schema: public
|
|
|
|
|
2021-01-18 09:56:25 +03:00
|
|
|
- type: track_table
|
|
|
|
args:
|
|
|
|
name: article
|
|
|
|
schema: public
|
|
|
|
|
2020-02-13 20:38:23 +03:00
|
|
|
- type: set_custom_types
|
|
|
|
args:
|
|
|
|
input_objects:
|
|
|
|
- name: UserInput
|
|
|
|
fields:
|
|
|
|
- name: name
|
|
|
|
type: String!
|
|
|
|
- name: email
|
|
|
|
type: String!
|
2021-03-19 17:46:50 +03:00
|
|
|
- name: parent
|
|
|
|
type: UserInput
|
2020-02-13 20:38:23 +03:00
|
|
|
|
2020-03-20 09:46:45 +03:00
|
|
|
- name: InObject
|
|
|
|
fields:
|
|
|
|
- name: id
|
|
|
|
type: ID
|
|
|
|
- name: name
|
|
|
|
type: String
|
|
|
|
- name: age
|
|
|
|
type: Int
|
|
|
|
|
2021-09-17 10:43:43 +03:00
|
|
|
- name: IntentionalErrorInput
|
|
|
|
fields:
|
|
|
|
- name: message
|
|
|
|
type: String!
|
|
|
|
- name: code
|
|
|
|
type: String
|
|
|
|
- name: extensions
|
|
|
|
type: json
|
2022-06-03 12:47:10 +03:00
|
|
|
|
|
|
|
scalars:
|
|
|
|
- name: myCustomScalar
|
2021-09-17 10:43:43 +03:00
|
|
|
|
2020-02-13 20:38:23 +03:00
|
|
|
objects:
|
|
|
|
- name: UserId
|
|
|
|
fields:
|
|
|
|
- name: id
|
|
|
|
type: Int!
|
|
|
|
relationships:
|
|
|
|
- name: user
|
|
|
|
type: object
|
|
|
|
remote_table: user
|
|
|
|
field_mapping:
|
|
|
|
id: id
|
2021-01-18 09:56:25 +03:00
|
|
|
- name: articles
|
|
|
|
type: array
|
|
|
|
remote_table: article
|
|
|
|
field_mapping:
|
|
|
|
id: user_id
|
2020-02-13 20:38:23 +03:00
|
|
|
|
2021-12-16 02:51:52 +03:00
|
|
|
- name: UserId2
|
|
|
|
fields:
|
|
|
|
- name: id
|
|
|
|
type: Int!
|
|
|
|
|
2020-03-20 09:46:45 +03:00
|
|
|
- name: OutObject
|
|
|
|
fields:
|
|
|
|
- name: id
|
|
|
|
type: ID! # For issue https://github.com/hasura/graphql-engine/issues/4061
|
|
|
|
- name: name
|
|
|
|
type: String
|
2021-10-29 07:12:27 +03:00
|
|
|
|
2022-01-31 09:49:11 +03:00
|
|
|
- name: Headers
|
|
|
|
fields:
|
|
|
|
- name: name
|
|
|
|
type: String!
|
|
|
|
- name: value
|
|
|
|
type: String!
|
|
|
|
|
|
|
|
- name: OutHeaders
|
|
|
|
fields:
|
|
|
|
- name: headers
|
|
|
|
type: '[Headers]'
|
|
|
|
|
2022-01-19 07:46:42 +03:00
|
|
|
- name: OutObjectTransformed
|
|
|
|
fields:
|
|
|
|
- name: foo
|
|
|
|
type: ID!
|
|
|
|
- name: bar
|
|
|
|
type: String
|
2022-02-15 17:39:35 +03:00
|
|
|
|
|
|
|
- name: OutObjectScalarTransformed
|
|
|
|
fields:
|
|
|
|
- name: foo
|
|
|
|
type: String!
|
2022-01-19 07:46:42 +03:00
|
|
|
|
2021-12-16 02:51:52 +03:00
|
|
|
- name: Address
|
|
|
|
fields:
|
|
|
|
- name: city
|
|
|
|
type: String
|
|
|
|
- name: country
|
|
|
|
type: String
|
|
|
|
|
|
|
|
- name: NestedOutObject
|
|
|
|
fields:
|
|
|
|
- name: id
|
|
|
|
type: Int!
|
|
|
|
- name: user_id
|
|
|
|
type: UserId2
|
|
|
|
- name: address
|
|
|
|
type: Address
|
|
|
|
- name: addresses
|
|
|
|
type: '[Address]'
|
|
|
|
|
2022-01-19 07:46:42 +03:00
|
|
|
- name: NestedOutObjectTransformed
|
|
|
|
fields:
|
|
|
|
- name: uid
|
|
|
|
type: ID!
|
|
|
|
- name: city0
|
|
|
|
type: String
|
|
|
|
- name: country0
|
|
|
|
type: String
|
|
|
|
- name: other_addresses
|
|
|
|
type: '[Address]'
|
|
|
|
|
2022-03-03 06:43:27 +03:00
|
|
|
- name: NestedJoinObject
|
|
|
|
fields:
|
|
|
|
- name: id
|
|
|
|
type: Int!
|
|
|
|
- name: user_id
|
|
|
|
type: UserId
|
|
|
|
- name: address
|
|
|
|
type: Address
|
|
|
|
- name: addresses
|
|
|
|
type: '[Address]'
|
|
|
|
|
2021-12-16 02:51:52 +03:00
|
|
|
- name: DirectRecursiveType
|
|
|
|
fields:
|
|
|
|
- name: id
|
|
|
|
type: Int!
|
|
|
|
- name: this
|
|
|
|
type: DirectRecursiveType
|
|
|
|
|
|
|
|
- name: ListRecursiveType
|
|
|
|
fields:
|
|
|
|
- name: id
|
|
|
|
type: Int!
|
|
|
|
- name: these
|
|
|
|
type: '[ListRecursiveType]'
|
|
|
|
|
|
|
|
- name: MutuallyRecursiveTypeA
|
|
|
|
fields:
|
|
|
|
- name: id
|
|
|
|
type: Int!
|
|
|
|
- name: that
|
|
|
|
type: MutuallyRecursiveTypeB
|
|
|
|
|
|
|
|
- name: MutuallyRecursiveTypeB
|
|
|
|
fields:
|
|
|
|
- name: id
|
|
|
|
type: Int!
|
|
|
|
- name: other
|
|
|
|
type: MutuallyRecursiveTypeA
|
|
|
|
|
|
|
|
- name: Recursive
|
|
|
|
fields:
|
|
|
|
- name: direct
|
|
|
|
type: DirectRecursiveType
|
|
|
|
- name: list
|
|
|
|
type: ListRecursiveType
|
|
|
|
- name: mutual
|
|
|
|
type: MutuallyRecursiveTypeA
|
|
|
|
|
2021-10-11 09:55:05 +03:00
|
|
|
- name: NullableResp
|
|
|
|
fields:
|
|
|
|
- name: id
|
2022-02-15 17:39:35 +03:00
|
|
|
type: Int!
|
2020-03-20 09:46:45 +03:00
|
|
|
|
2022-01-19 07:46:42 +03:00
|
|
|
- name: ResultIdList
|
|
|
|
fields:
|
|
|
|
- name: result_ids
|
|
|
|
type: '[Int!]!'
|
|
|
|
|
|
|
|
- name: Result
|
|
|
|
fields:
|
|
|
|
- name: id
|
|
|
|
type: Int!
|
|
|
|
|
2022-04-18 12:58:15 +03:00
|
|
|
- name: TypedNestedNull
|
|
|
|
fields:
|
|
|
|
- name: id
|
|
|
|
type: ID!
|
|
|
|
- name: child
|
|
|
|
type: TypedNestedNull
|
|
|
|
|
2020-02-13 20:38:23 +03:00
|
|
|
- type: create_action
|
|
|
|
args:
|
|
|
|
name: create_user
|
|
|
|
definition:
|
|
|
|
kind: synchronous
|
|
|
|
arguments:
|
|
|
|
- name: email
|
|
|
|
type: String!
|
|
|
|
- name: name
|
|
|
|
type: String!
|
|
|
|
output_type: UserId
|
2022-08-03 23:04:32 +03:00
|
|
|
handler: "{{ACTION_WEBHOOK_HANDLER}}/create-user"
|
2020-02-13 20:38:23 +03:00
|
|
|
|
|
|
|
- type: create_action
|
|
|
|
args:
|
|
|
|
name: create_users
|
|
|
|
definition:
|
|
|
|
kind: synchronous
|
|
|
|
arguments:
|
|
|
|
- name: users
|
|
|
|
type: '[UserInput!]!'
|
|
|
|
output_type: '[UserId]'
|
2022-08-03 23:04:32 +03:00
|
|
|
handler: "{{ACTION_WEBHOOK_HANDLER}}/create-users"
|
2020-03-20 09:46:45 +03:00
|
|
|
|
|
|
|
- type: create_action
|
|
|
|
args:
|
|
|
|
name: mirror
|
|
|
|
definition:
|
|
|
|
kind: synchronous
|
|
|
|
arguments:
|
|
|
|
- name: arg
|
2021-01-06 19:06:24 +03:00
|
|
|
type: InObject!
|
|
|
|
output_type: OutObject
|
2022-08-03 23:04:32 +03:00
|
|
|
handler: "{{ACTION_WEBHOOK_HANDLER}}/mirror-action"
|
2020-04-16 10:25:19 +03:00
|
|
|
|
2021-09-16 14:03:01 +03:00
|
|
|
- type: create_action
|
2021-09-28 04:37:35 +03:00
|
|
|
args:
|
|
|
|
name: mirror_transformed
|
|
|
|
definition:
|
|
|
|
kind: synchronous
|
|
|
|
arguments:
|
|
|
|
- name: arg
|
|
|
|
type: InObject!
|
|
|
|
output_type: OutObject
|
2022-08-03 23:04:32 +03:00
|
|
|
handler: "{{ACTION_WEBHOOK_HANDLER}}/mirror-action"
|
2021-09-28 04:37:35 +03:00
|
|
|
|
|
|
|
- type: update_action
|
2021-09-16 14:03:01 +03:00
|
|
|
args:
|
|
|
|
name: mirror_transformed
|
|
|
|
definition:
|
|
|
|
kind: synchronous
|
|
|
|
arguments:
|
|
|
|
- name: arg
|
|
|
|
type: InObject!
|
|
|
|
output_type: OutObject
|
2022-08-03 23:04:32 +03:00
|
|
|
handler: "{{ACTION_WEBHOOK_HANDLER}}/mirror-action"
|
2021-10-29 07:12:27 +03:00
|
|
|
request_transform:
|
2022-02-17 07:36:24 +03:00
|
|
|
version: 2
|
2021-10-29 07:12:27 +03:00
|
|
|
template_engine: Kriti
|
2022-02-17 07:36:24 +03:00
|
|
|
body:
|
|
|
|
action: transform
|
|
|
|
template: |
|
|
|
|
{
|
|
|
|
"input": {
|
|
|
|
"arg": {
|
|
|
|
"id": {{ $body.input.arg.name }},
|
|
|
|
"name": {{ $body.input.arg.id }}
|
|
|
|
}
|
2021-10-29 07:12:27 +03:00
|
|
|
}
|
2021-09-16 14:03:01 +03:00
|
|
|
}
|
|
|
|
|
2022-01-19 07:46:42 +03:00
|
|
|
- type: create_action
|
|
|
|
args:
|
|
|
|
name: mirror_transformed_output
|
|
|
|
definition:
|
|
|
|
kind: synchronous
|
|
|
|
arguments:
|
|
|
|
- name: arg
|
|
|
|
type: InObject!
|
|
|
|
output_type: OutObjectTransformed
|
2022-08-03 23:04:32 +03:00
|
|
|
handler: "{{ACTION_WEBHOOK_HANDLER}}/mirror-action"
|
2022-01-19 07:46:42 +03:00
|
|
|
|
|
|
|
- type: update_action
|
|
|
|
args:
|
|
|
|
name: mirror_transformed_output
|
|
|
|
definition:
|
|
|
|
kind: synchronous
|
|
|
|
arguments:
|
|
|
|
- name: arg
|
|
|
|
type: InObject!
|
|
|
|
output_type: OutObjectTransformed
|
2022-08-03 23:04:32 +03:00
|
|
|
handler: "{{ACTION_WEBHOOK_HANDLER}}/mirror-action"
|
2022-01-19 07:46:42 +03:00
|
|
|
response_transform:
|
2022-02-17 07:36:24 +03:00
|
|
|
version: 2
|
2022-01-19 07:46:42 +03:00
|
|
|
template_engine: Kriti
|
2022-02-17 07:36:24 +03:00
|
|
|
body:
|
|
|
|
action: transform
|
|
|
|
template: |
|
|
|
|
{
|
|
|
|
"foo": {{ $body.id }},
|
|
|
|
"bar": {{ $body.name }}
|
|
|
|
}
|
2022-01-19 07:46:42 +03:00
|
|
|
|
2022-01-31 09:49:11 +03:00
|
|
|
- type: create_action
|
|
|
|
args:
|
|
|
|
name: mirror_headers
|
|
|
|
definition:
|
|
|
|
type: query
|
|
|
|
output_type: OutHeaders
|
2022-08-03 23:04:32 +03:00
|
|
|
handler: "{{ACTION_WEBHOOK_HANDLER}}/mirror-headers"
|
2022-01-31 09:49:11 +03:00
|
|
|
|
2020-04-16 10:25:19 +03:00
|
|
|
- type: create_action
|
|
|
|
args:
|
|
|
|
name: get_user_by_email
|
|
|
|
definition:
|
|
|
|
type: query
|
|
|
|
arguments:
|
|
|
|
- name: email
|
2021-01-06 19:06:24 +03:00
|
|
|
type: String!
|
|
|
|
output_type: UserId!
|
2022-08-03 23:04:32 +03:00
|
|
|
handler: "{{ACTION_WEBHOOK_HANDLER}}/get-user-by-email"
|
2020-04-16 10:25:19 +03:00
|
|
|
|
2021-12-16 02:51:52 +03:00
|
|
|
- type: create_action
|
|
|
|
args:
|
|
|
|
name: get_user_by_email_nested
|
|
|
|
definition:
|
|
|
|
type: query
|
|
|
|
arguments:
|
|
|
|
- name: email
|
|
|
|
type: String!
|
|
|
|
output_type: NestedOutObject!
|
2022-08-03 23:04:32 +03:00
|
|
|
handler: "{{ACTION_WEBHOOK_HANDLER}}/get-user-by-email-nested"
|
2021-12-16 02:51:52 +03:00
|
|
|
|
2022-01-19 07:46:42 +03:00
|
|
|
- type: create_action
|
|
|
|
args:
|
|
|
|
name: get_user_by_email_nested_transformed
|
|
|
|
definition:
|
|
|
|
type: query
|
|
|
|
arguments:
|
|
|
|
- name: email
|
|
|
|
type: String!
|
|
|
|
output_type: NestedOutObjectTransformed!
|
2022-08-03 23:04:32 +03:00
|
|
|
handler: "{{ACTION_WEBHOOK_HANDLER}}/get-user-by-email-nested"
|
2022-01-19 07:46:42 +03:00
|
|
|
response_transform:
|
2022-02-17 07:36:24 +03:00
|
|
|
version: 2
|
2022-01-19 07:46:42 +03:00
|
|
|
template_engine: Kriti
|
2022-02-17 07:36:24 +03:00
|
|
|
body:
|
|
|
|
action: transform
|
|
|
|
template: |
|
|
|
|
{
|
|
|
|
"uid": {{ $body.user_id.id }},
|
|
|
|
"city0": {{ $body.addresses[0].city }},
|
|
|
|
"country0": {{ $body.addresses[0].country }},
|
|
|
|
"other_addresses":
|
|
|
|
{{ range i, x := $body.addresses }}
|
|
|
|
{{ if i > 0 }}
|
|
|
|
{
|
|
|
|
"city": {{ x.city }},
|
|
|
|
"country": {{ x.country }}
|
|
|
|
}
|
|
|
|
{{ else }}
|
|
|
|
null
|
|
|
|
{{ end }}
|
2022-01-19 07:46:42 +03:00
|
|
|
{{ end }}
|
2022-02-17 07:36:24 +03:00
|
|
|
}
|
2022-01-19 07:46:42 +03:00
|
|
|
|
2022-03-03 06:43:27 +03:00
|
|
|
- type: create_action
|
|
|
|
args:
|
|
|
|
name: get_user_by_email_nested_join
|
|
|
|
definition:
|
|
|
|
type: query
|
|
|
|
arguments:
|
|
|
|
- name: email
|
|
|
|
type: String!
|
|
|
|
output_type: NestedJoinObject!
|
2022-08-03 23:04:32 +03:00
|
|
|
handler: "{{ACTION_WEBHOOK_HANDLER}}/get-user-by-email-nested"
|
2022-03-03 06:43:27 +03:00
|
|
|
|
2020-04-16 10:25:19 +03:00
|
|
|
- type: create_action
|
|
|
|
args:
|
|
|
|
name: get_users_by_email
|
|
|
|
definition:
|
|
|
|
type: query
|
|
|
|
arguments:
|
|
|
|
- name: email
|
2021-01-06 19:06:24 +03:00
|
|
|
type: String!
|
2020-04-16 10:25:19 +03:00
|
|
|
output_type: '[UserId]!'
|
2022-08-03 23:04:32 +03:00
|
|
|
handler: "{{ACTION_WEBHOOK_HANDLER}}/get-users-by-email"
|
2021-01-12 15:03:21 +03:00
|
|
|
|
2021-12-16 02:51:52 +03:00
|
|
|
- type: create_action
|
|
|
|
args:
|
|
|
|
name: get_users_by_email_nested
|
|
|
|
definition:
|
|
|
|
type: query
|
|
|
|
arguments:
|
|
|
|
- name: email
|
|
|
|
type: String!
|
|
|
|
output_type: '[NestedOutObject]!'
|
2022-08-03 23:04:32 +03:00
|
|
|
handler: "{{ACTION_WEBHOOK_HANDLER}}/get-users-by-email-nested"
|
2021-12-16 02:51:52 +03:00
|
|
|
|
2021-09-17 10:43:43 +03:00
|
|
|
- type: create_action
|
|
|
|
args:
|
|
|
|
name: intentional_error
|
|
|
|
definition:
|
|
|
|
type: query
|
|
|
|
arguments:
|
|
|
|
- name: blob
|
|
|
|
type: IntentionalErrorInput!
|
|
|
|
# this can be anything, since this action never succeeds
|
|
|
|
output_type: '[UserId]!'
|
2022-08-03 23:04:32 +03:00
|
|
|
handler: "{{ACTION_WEBHOOK_HANDLER}}/intentional-error"
|
2021-09-17 10:43:43 +03:00
|
|
|
|
2021-10-11 09:55:05 +03:00
|
|
|
- type: create_action
|
|
|
|
args:
|
|
|
|
name: null_response
|
|
|
|
definition:
|
|
|
|
kind: synchronous
|
|
|
|
arguments:
|
|
|
|
output_type: NullableResp
|
2022-08-03 23:04:32 +03:00
|
|
|
handler: "{{ACTION_WEBHOOK_HANDLER}}/null-response"
|
2021-10-11 09:55:05 +03:00
|
|
|
|
2022-02-15 17:39:35 +03:00
|
|
|
- type: create_action
|
|
|
|
args:
|
|
|
|
name: scalar_response
|
|
|
|
definition:
|
|
|
|
kind: synchronous
|
|
|
|
arguments:
|
|
|
|
output_type: String!
|
2022-08-03 23:04:32 +03:00
|
|
|
handler: "{{ACTION_WEBHOOK_HANDLER}}/scalar-response"
|
2022-02-15 17:39:35 +03:00
|
|
|
|
2022-06-03 12:47:10 +03:00
|
|
|
- type: create_action
|
|
|
|
args:
|
|
|
|
name: pgscalar_response
|
|
|
|
definition:
|
|
|
|
kind: synchronous
|
|
|
|
arguments:
|
|
|
|
output_type: json!
|
2022-08-03 23:04:32 +03:00
|
|
|
handler: "{{ACTION_WEBHOOK_HANDLER}}/json-response"
|
2022-06-03 12:47:10 +03:00
|
|
|
|
|
|
|
- type: create_action
|
|
|
|
args:
|
|
|
|
name: custom_scalar_response
|
|
|
|
definition:
|
|
|
|
kind: synchronous
|
|
|
|
arguments:
|
|
|
|
output_type: myCustomScalar!
|
2022-08-03 23:04:32 +03:00
|
|
|
handler: "{{ACTION_WEBHOOK_HANDLER}}/json-response"
|
2022-06-03 12:47:10 +03:00
|
|
|
|
2022-05-31 08:22:46 +03:00
|
|
|
- type: create_action
|
|
|
|
args:
|
|
|
|
name: scalar_array_response
|
|
|
|
definition:
|
|
|
|
kind: synchronous
|
|
|
|
arguments:
|
|
|
|
output_type: '[String]!'
|
2022-08-03 23:04:32 +03:00
|
|
|
handler: "{{ACTION_WEBHOOK_HANDLER}}/scalar-array-response"
|
2022-05-31 08:22:46 +03:00
|
|
|
|
2022-06-03 12:47:10 +03:00
|
|
|
- type: create_action
|
|
|
|
args:
|
|
|
|
name: custom_scalar_array_response
|
|
|
|
definition:
|
|
|
|
kind: synchronous
|
|
|
|
arguments:
|
|
|
|
output_type: '[myCustomScalar!]!'
|
2022-08-03 23:04:32 +03:00
|
|
|
handler: "{{ACTION_WEBHOOK_HANDLER}}/custom-scalar-array-response"
|
2022-06-03 12:47:10 +03:00
|
|
|
|
|
|
|
- type: create_action
|
|
|
|
args:
|
|
|
|
name: custom_scalar_nested_array_response
|
|
|
|
definition:
|
|
|
|
kind: synchronous
|
|
|
|
arguments:
|
|
|
|
output_type: '[[myCustomScalar!]]!'
|
2022-08-03 23:04:32 +03:00
|
|
|
handler: "{{ACTION_WEBHOOK_HANDLER}}/custom-scalar-array-response"
|
2022-06-03 12:47:10 +03:00
|
|
|
|
2021-01-12 15:03:21 +03:00
|
|
|
- type: create_select_permission
|
|
|
|
args:
|
|
|
|
table: user
|
|
|
|
role: user
|
|
|
|
permission:
|
|
|
|
columns:
|
|
|
|
- id
|
|
|
|
- name
|
|
|
|
- email
|
|
|
|
filter:
|
|
|
|
id: X-Hasura-User-Id
|
|
|
|
|
|
|
|
- type: create_action_permission
|
|
|
|
args:
|
|
|
|
action: get_user_by_email
|
|
|
|
role: user
|
2021-12-16 02:51:52 +03:00
|
|
|
|
|
|
|
- type: create_action
|
|
|
|
args:
|
|
|
|
name: recursive_output
|
|
|
|
definition:
|
|
|
|
type: query
|
|
|
|
output_type: Recursive
|
2022-08-03 23:04:32 +03:00
|
|
|
handler: "{{ACTION_WEBHOOK_HANDLER}}/recursive-output"
|
2022-01-19 07:46:42 +03:00
|
|
|
|
|
|
|
- type: create_action
|
|
|
|
args:
|
|
|
|
name: result_list
|
|
|
|
definition:
|
|
|
|
type: query
|
|
|
|
output_type: 'ResultIdList'
|
2022-08-03 23:04:32 +03:00
|
|
|
handler: "{{ACTION_WEBHOOK_HANDLER}}/get-results"
|
2022-01-19 07:46:42 +03:00
|
|
|
|
|
|
|
- type: create_action
|
|
|
|
args:
|
|
|
|
name: results
|
|
|
|
definition:
|
|
|
|
type: query
|
|
|
|
output_type: '[Result]'
|
2022-08-03 23:04:32 +03:00
|
|
|
handler: "{{ACTION_WEBHOOK_HANDLER}}/get-results"
|
2022-01-19 07:46:42 +03:00
|
|
|
response_transform:
|
2022-02-17 07:36:24 +03:00
|
|
|
version: 2
|
2022-01-19 07:46:42 +03:00
|
|
|
template_engine: Kriti
|
2022-02-17 07:36:24 +03:00
|
|
|
body:
|
|
|
|
action: transform
|
|
|
|
template: |
|
|
|
|
{{ range i, x := $body.result_ids }}
|
|
|
|
{
|
|
|
|
"id": {{ x }}
|
|
|
|
}
|
|
|
|
{{ end }}
|
2022-04-18 12:58:15 +03:00
|
|
|
|
|
|
|
- type: create_action
|
|
|
|
args:
|
|
|
|
name: typed_nested_null
|
|
|
|
definition:
|
|
|
|
type: query
|
|
|
|
output_type: TypedNestedNull!
|
2022-08-03 23:04:32 +03:00
|
|
|
handler: "{{ACTION_WEBHOOK_HANDLER}}/typed-nested-null"
|
2022-04-18 12:58:15 +03:00
|
|
|
|
|
|
|
- type: create_action
|
|
|
|
args:
|
|
|
|
name: typed_nested_null_wrong_field
|
|
|
|
definition:
|
|
|
|
type: query
|
|
|
|
output_type: TypedNestedNull!
|
2022-08-03 23:04:32 +03:00
|
|
|
handler: "{{ACTION_WEBHOOK_HANDLER}}/typed-nested-null-wrong-field"
|