Event trigger making the insert query fail
See original GitHub issueI have a task table. When I call the insert_task mutation, it works. But as soon as I add an event trigger listening on inserts in that table, I get the following error:
{ "errors": [ { "internal": { "statement": "WITH \"public_task__rel_insert_result\" AS (INSERT INTO \"public\".\"task\" ( \"createdAt\", \"detectField\", \"displayField\", \"endedAt\", \"processedEntries\", \"userId\", \"id\", \"title\" ) VALUES ( DEFAULT, $1, $2, DEFAULT, DEFAULT, $3, $4, $5 ) RETURNING * ) SELECT coalesce((json_agg(\"root\" )->0), 'null' ) AS \"root\" FROM (SELECT row_to_json((SELECT \"e\" FROM (SELECT \"root.base\".\"id\" AS \"id\" ) AS \"e\" ) ) AS \"root\" FROM (SELECT * FROM \"public_task__rel_insert_result\" WHERE ('true') ) AS \"root.base\" ) AS \"root\" ", "prepared": true, "error": { "exec_status": "FatalError", "hint": null, "message": "record \"new\" has no field \"createdat\"", "status_code": "42703", "description": null }, "arguments": [ "(Oid 25,Just (\"Full Name\",Binary))", "(Oid 25,Just (\"Type\",Binary))", "(Oid 0,Just (\"82b10a97-ce9b-4530-844d-fb8065076e58\",Text))", "(Oid 0,Just (\"88c49254-49c1-48eb-8b67-3ca7c04c348b\",Text))", "(Oid 25,Just (\"file.csv\",Binary))" ] }, "path": "$.selectionSet.insert_task.args.objects[0]", "error": "postgres query error", "code": "postgres-error" } ] }
Here is the configuration of my trigger.
Am I doing anything wrong here?
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (5 by maintainers)
It works now. Thank you for the amazing responsiveness and for the good work! 😃
@brundozer The fix was released in
v1.0.0-alpah24
. Hope you have upgraded already.