forked from hasura/graphql-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
server: add custom timeouts to actions (hasura#5762)
- Loading branch information
1 parent
93b6a07
commit ca8b52f
Showing
14 changed files
with
188 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
type: bulk | ||
args: | ||
- 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 | ||
); | ||
- type: track_table | ||
args: | ||
name: user | ||
schema: public | ||
|
||
- type: set_custom_types | ||
args: | ||
objects: | ||
- name: UserId | ||
fields: | ||
- name: id | ||
type: Int! | ||
relationships: | ||
- name: user | ||
type: object | ||
remote_table: user | ||
field_mapping: | ||
id: id | ||
|
||
- type: create_action | ||
args: | ||
name: create_user | ||
definition: | ||
kind: asynchronous | ||
arguments: | ||
- name: email | ||
type: String! | ||
- name: name | ||
type: String! | ||
output_type: UserId | ||
timeout: 2 | ||
handler: http://127.0.0.1:5593/create-user-timeout |
15 changes: 15 additions & 0 deletions
15
server/tests-py/queries/actions/timeout/schema_teardown.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
type: bulk | ||
args: | ||
- type: drop_action | ||
args: | ||
name: create_user | ||
clear_data: true | ||
# clear custom types | ||
- type: set_custom_types | ||
args: {} | ||
|
||
- type: run_sql | ||
args: | ||
cascade: true | ||
sql: | | ||
DROP TABLE "user"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
type: bulk | ||
args: | ||
- type: run_sql | ||
args: | ||
sql: | | ||
DELETE FROM "user"; | ||
SELECT setval('user_id_seq', 1, FALSE); |
Oops, something went wrong.