Skip to content

Issue updating 3rd nested level #53

Open
@francescovenica

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions