diff --git a/config/generate_config.go b/config/generate_config.go index 7d48071..407be82 100644 --- a/config/generate_config.go +++ b/config/generate_config.go @@ -52,11 +52,11 @@ func (c *GenerateConfig) IsEnableClientJsonOmitemptyTag() bool { return true } - if c.EnableClientJsonOmitemptyTag != nil && *c.EnableClientJsonOmitemptyTag { + if c.EnableClientJsonOmitemptyTag == nil { return true } - return false + return *c.EnableClientJsonOmitemptyTag } func (c *GenerateConfig) GetClientInterfaceName() *string { diff --git a/example/autobind/schema/schema.graphql b/example/autobind/schema/schema.graphql index 6e516c8..1ebed47 100644 --- a/example/autobind/schema/schema.graphql +++ b/example/autobind/schema/schema.graphql @@ -13,7 +13,7 @@ type Mutation { type User { id: ID! - profile: Profile! + profile: Profile } type Profile { diff --git a/main.go b/main.go index 54afb6d..bfb27f6 100644 --- a/main.go +++ b/main.go @@ -9,7 +9,7 @@ import ( "github.com/urfave/cli/v2" ) -const version = "0.28.0" +const version = "0.28.1" var versionCmd = &cli.Command{ Name: "version",