Created
November 17, 2018 18:33
-
-
Save dxlbnl/c03d3bb53bbda465498bc22182ae042a to your computer and use it in GitHub Desktop.
Hasura error with GENERATED ALWAYS
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
graphql_1 | { | |
"timestamp": "2018-11-17T18:09:55.628+0000", | |
"level": "info", | |
"type": "http-log", | |
"detail": { | |
"status": 500, | |
"query_hash": "cb9097259d9674a46228be3b19979abd7f46b6aa", | |
"http_version": "HTTP/1.1", | |
"query_execution_time": 0.014521827, | |
"request_id": null, | |
"url": "/v1alpha1/graphql", | |
"ip": "172.19.0.1", | |
"response_size": 1166, | |
"user": { | |
"x-hasura-role": "login", | |
"x-hasura-user-id": "-1" | |
}, | |
"method": "POST", | |
"detail": { | |
"error": { | |
"internal": { | |
"statement": "WITH \"public_user__mutation_result_alias\" AS (INSERT INTO \"hdb_views\".\"login__insert__public__user\" ( \"email\", \"created\", \"username\", \"modified\", \"password\", \"emailverified\", \"id\" ) VALUES ( $1, DEFAULT, $2, DEFAULT, DEFAULT, $3, DEFAULT ) RETURNING * ) SELECT json_build_object('response', (SELECT coalesce((json_agg(\"root\" )->0), 'null' ) AS \"root\" FROM (SELECT row_to_json((SELECT \"_1_e\" FROM (SELECT \"_0_root.base\".\"id\" AS \"id\" ) AS \"_1_e\" ) ) AS \"root\" FROM (SELECT * FROM \"public_user__mutation_result_alias\" WHERE ('true') ) AS \"_0_root.base\" ) AS \"_2_root\" ) ) ", | |
"prepared": true, | |
"error": { | |
"exec_status": "FatalError", | |
"hint": "Use OVERRIDING SYSTEM VALUE to override.", | |
"message": "cannot insert into column \"id\"", | |
"status_code": "428C9", | |
"description": "Column \"id\" is an identity column defined as GENERATED ALWAYS." | |
}, | |
"arguments": [ | |
"(Oid 25,Just (\"[email protected]\",Binary))", | |
"(Oid 25,Just (\"un\",Binary))", | |
"(Oid 16,Just (\"\\SOH\",Binary))" | |
] | |
}, | |
"path": "$.selectionSet.insert_user.args.objects[0]", | |
"error": "postgres query error", | |
"code": "postgres-error" | |
}, | |
"request": "{\"query\":\"mutation($email:String, $username:String, $access_token:String, $facebook_id:String) {\\n\\tinsert_user(objects:{\\n email: $email,\\n username:$username,\\n emailverified:true,\\n facebook_tokens: {\\n data: {\\n access_token:$access_token,\\n facebook_id:$facebook_id\\n }\\n }\\n }) {\\n returning {\\n id\\n }\\n\\t}\\n}\",\"variables\":{\"email\":\"[email protected]\",\"username\":\"un\",\"access_token\":\"Testing\",\"facebook_id\":\"123\"}}" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment