Skip to content

nested-mutations plugin adds omitted reference column #46

Open
@frisi

Description

when this plugin is enabled, a column that otherwise is omitted from the generated api is still present

to reproduce

create table articles
(
    id  int generated by default as identity primary key
);

create table article_drafts
(
    id     int references articles (id) on delete cascade,
    title  text
);
comment on column article_drafts.id is E'@omit update';

when plugins-nested-mutations is disabled the resulting updateArticleDraft mutation's path type ArticleDraftPatch does not have an id

when it is enabled, ArticleDraftPatch has a field id (but it gets ignored on updates)

expectation

i'd say if the id column is omitted from the update mutation by a smart tag, also this plugin should respect that.

the ArticleDraftPatch should neither have a field id: Int nor articleToId: ArticleDraftsIdFkeyInput

versions used

using version 1.1.0 with postgraphile 4.11.0

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