From 7fc697f5cf4fa3aab7416e10d54e37559fd36ac0 Mon Sep 17 00:00:00 2001 From: Jeffrey Stiles Date: Tue, 23 Jul 2024 21:22:17 -0700 Subject: [PATCH] entgql: support SkipMutationCreateInput (and update) on entity (#598) --- entgql/schema.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/entgql/schema.go b/entgql/schema.go index 44f17aec9..ddf08a8a4 100644 --- a/entgql/schema.go +++ b/entgql/schema.go @@ -546,6 +546,13 @@ func (e *schemaGenerator) buildMutationInputs(t *gen.Type, ant *Annotation, gqlT var defs []*ast.Definition for _, i := range ant.MutationInputs { + if i.IsCreate && ant.Skip.Is(SkipMutationCreateInput) { + continue + } + if !i.IsCreate && ant.Skip.Is(SkipMutationUpdateInput) { + continue + } + desc := MutationDescriptor{Type: t, IsCreate: i.IsCreate} name, err := desc.Input() if err != nil {