postgraphile-plugin-nested-mutations icon indicating copy to clipboard operation
postgraphile-plugin-nested-mutations copied to clipboard

nested-mutations plugin adds omitted reference column

Open frisi opened this issue 4 years ago • 1 comments

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

frisi avatar Apr 07 '21 09:04 frisi

Same problem here, still

HighLiuk avatar Oct 23 '22 21:10 HighLiuk