Skip to content

Commit

Permalink
entgql: support SkipMutationCreateInput (and update) on entity (#598)
Browse files Browse the repository at this point in the history
  • Loading branch information
freb authored Jul 24, 2024
1 parent fcf98f0 commit 7fc697f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions entgql/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7fc697f

Please sign in to comment.