We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 857a114 commit 30269c6Copy full SHA for 30269c6
modelgen/models.go
@@ -170,7 +170,7 @@ func (m *Plugin) MutateConfig(cfg *config.Config) error {
170
typ = binder.CopyModifiersFromAst(field.Type, typ)
171
172
tag := `json:"` + field.Name + `"`
173
- if schemaType.Kind == ast.InputObject {
+ if schemaType.Kind == ast.InputObject && !field.Type.NonNull {
174
switch typ.(type) {
175
case *types.Slice:
176
optionalTypeName := fmt.Sprintf("Optional%sSlice", field.Type.Name())
0 commit comments