We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If we try to update a column through an update mutation using multiple (> 1) operators, then it results in Postgres query error.
For a simple article table:- Query:
article
mutation { update_article( _set: {id: 1} _inc: {id: 2} where: {author_id: {_eq: 1}} ){ affected_rows } }
Response:
{ "errors": [ { "extensions": { "internal": { "statement": "WITH \"public_article__mutation_result_alias\" AS (UPDATE \"public\".\"article\" SET \"id\" = $1,\"id\" = (\"id\"+('2')::integer) WHERE (('true') AND (((((\"public\".\"article\".\"author_id\") = ($2)) AND ('true')) AND ('true')) AND ('true'))) RETURNING * ) SELECT json_build_object('affected_rows', (SELECT COUNT(*) FROM \"public_article__mutation_result_alias\" ) ) ", "prepared": true, "error": { "exec_status": "FatalError", "hint": null, "message": "multiple assignments to same column \"id\"", "status_code": "42601", "description": null }, "arguments": [ "(Oid 23,Just (\"\\NUL\\NUL\\NUL\\SOH\",Binary))", "(Oid 23,Just (\"\\NUL\\NUL\\NUL\\SOH\",Binary))" ] }, "path": "$", "code": "unexpected" }, "message": "postgres query error" } ] }
Ideally, the server should make a validation check if a column is being updated using multiple operators.
The text was updated successfully, but these errors were encountered:
fix updating a column with multiple operators causing postgres query …
86cab62
…error, fix hasura#3432
53061cd
cb682e2
…error (fix #3432) (#3458)
8ae2823
…error (fix hasura#3432) (hasura#3458)
rakeshkky
Successfully merging a pull request may close this issue.
If we try to update a column through an update mutation using multiple (> 1) operators, then it results in Postgres query error.
For a simple
article
table:-Query:
Response:
Ideally, the server should make a validation check if a column is being updated using multiple operators.
The text was updated successfully, but these errors were encountered: