-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
k/bugSomething isn't workingSomething isn't working
Description
Version Information
Server Version:
2.6.1
Environment
Ubuntu 20
What is the expected behaviour?
Query should be working normally
Keywords
Fatal error, syntax error )
What is the current behaviour?
Getting fatal error
How to reproduce the issue?
mutation insertCustomerOneSocial(
$email: String! ="majefoj583@bunlets.com",
$password: String! = "randompsw",
$signupMethod: signup_methods_enum! = facebook,
$name: String = "Gastone",
$phone: String,
$surname: String = "Birillo",
) {
insert_customers_one(object: {
meeting_type: talks,
user: {data: {
email: $email,
password: $password,
role: customer,
status: active,
signup_method: $signupMethod,
agreements: {data: {
base: true,
marketing: false,
third_party: false,
profiling: false,
}},
registry: {data: {
name: $name,
surname: $surname,
phone: $phone,
sex: male, # placeholder
birth_date: "1970-01-01" # placeholder
address: {data: {}} # all default or nullable values
birth_place: {data: {}} # all default or nullable values
}}
}
}}) {
user {
id
email
role
status
signup_method
registry {
name
surname
phone
}
}
}
}Please provide any traces or logs that could help here.
{
"errors": [
{
"extensions": {
"internal": {
"statement": "WITH \"addresses__mutation_result\" AS (INSERT INTO \"public\".\"addresses\" ( ) VALUES () RETURNING * , ('true')::boolean AS \"check__constraint\") SELECT json_build_object('affected_rows', (SELECT COUNT(*) FROM \"addresses__mutation_result\" ), 'returning_columns', (SELECT coalesce(json_agg(\"root\" ), '[]' ) AS \"root\" FROM (SELECT row_to_json((SELECT \"_1_e\" FROM (SELECT (\"_0_root.base\".\"country\")::text AS \"country\", (\"_0_root.base\".\"zip\")::text AS \"zip\", (\"_0_root.base\".\"street\")::text AS \"street\", (\"_0_root.base\".\"city\")::text AS \"city\", (\"_0_root.base\".\"province\")::text AS \"province\", (\"_0_root.base\".\"id\")::text AS \"id\", (\"_0_root.base\".\"house_number\")::text AS \"house_number\" ) AS \"_1_e\" ) ) AS \"root\" FROM (SELECT * FROM \"addresses__mutation_result\" WHERE ('true') ) AS \"_0_root.base\" ) AS \"_2_root\" ) ) , (SELECT coalesce(bool_and(\"check__constraint\" ), 'true' ) FROM \"addresses__mutation_result\" ) ",
"prepared": false,
"error": {
"exec_status": "FatalError",
"hint": null,
"message": "syntax error at or near \")\"",
"status_code": "42601",
"description": null
},
"arguments": []
},
"path": "$.selectionSet.insert_customers_one.args.object[0].user.data.registry.data.address.data",
"code": "unexpected"
},
"message": "database query error"
}
]
}Any possible solutions?
No idea
Can you identify the location in the source code where the problem exists?
Syntax error in insert query
If the bug is confirmed, would you be willing to submit a PR?
Do not have the knowledge to fix and pr
aaronhayes, valera-yakovenko, sassela, carlosbaraza and hypernormal
Metadata
Metadata
Assignees
Labels
k/bugSomething isn't workingSomething isn't working