-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
Description
Team - I am getting a mutation failure.
v.1.1.0-beta.2 not sure if in previous builds
Problem: Mutation is failing due to null type cast.
Browser Response:
{"errors":[{"extensions":{"path":"$","code":"unexpected"},"message":"postgres query error"}]}
Postgres Error:
SQL Error [42883]: ERROR: operator does not exist: text = integer
Hint: No operator matches the given name and argument types. You might need to add explicit type casts.
Root Cause:
with "public_test__mutation_result_alias" as (
select * from (
values (('false')::boolean,
null, <-- this needs to be cast as an integer (e.g. null::integer) for joining template_id = id below
...
select
json_build_object('affected_rows',
...
(select * from "public"."test_template" where ((("_0_root.base"."template_id") = ("id")) and
Additional Comments:
This is a outer join to a related table (integer to integer) with no foreign keys.
If the value of the id is not null, the response is ok.
Thanks!
John
leandroanjos, Vishwas-93, lamqson, mwarger and michael-land