Open
Description
Hello,
I have a problem with a nested mutation but I'm not sure if I'm missing something or if it can't work, this is the schema I have:
CREATE TABLE media (
uuid uuid PRIMARY KEY DEFAULT uuid_generate_v4 (),
url text,
alt text
);
CREATE TABLE media_gallery (
uuid uuid PRIMARY KEY DEFAULT uuid_generate_v4 ()
);
CREATE TABLE media_gallery_item (
uuid uuid PRIMARY KEY DEFAULT uuid_generate_v4 (),
gallery_uuid uuid NOT NULL REFERENCES media_gallery (uuid) ON DELETE CASCADE,
media_uuid uuid NOT NULL REFERENCES media (uuid) ON DELETE CASCADE,
title text
);
and this is the body I'm sending:
{
"input": {
"patch": {
"mediaGalleryItems": {
"updateByUuid": [
{
"uuid": "938449fd-7173-42f5-b973-94c48fc61f81",
"patch": {
"title": "rewq 123",
"media": {
"updateByUuid": {
"uuid": "a5d08fc0-30ea-44a3-a379-20bbb3a703e0",
"patch": { "alt": "ciao" }
}
}
}
}
]
}
},
"uuid": "09248c26-864e-46a0-8e0b-7ab0a69f2e59"
}
}
the title rewq 123
work fine, the alt doesn't....am I missing something?
many thanks
Metadata
Metadata
Assignees
Labels
No labels
Activity