Skip to content

Commit 7fc697f

Browse files
authored
entgql: support SkipMutationCreateInput (and update) on entity (#598)
1 parent fcf98f0 commit 7fc697f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

entgql/schema.go

+7
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,13 @@ func (e *schemaGenerator) buildMutationInputs(t *gen.Type, ant *Annotation, gqlT
546546
var defs []*ast.Definition
547547

548548
for _, i := range ant.MutationInputs {
549+
if i.IsCreate && ant.Skip.Is(SkipMutationCreateInput) {
550+
continue
551+
}
552+
if !i.IsCreate && ant.Skip.Is(SkipMutationUpdateInput) {
553+
continue
554+
}
555+
549556
desc := MutationDescriptor{Type: t, IsCreate: i.IsCreate}
550557
name, err := desc.Input()
551558
if err != nil {

0 commit comments

Comments
 (0)