Skip to content

Commit

Permalink
Merge pull request #255 from abe-tetsu/fix-enable-omitempty
Browse files Browse the repository at this point in the history
Fix Conditional Logic for `OmitemptyTag`
  • Loading branch information
Yamashou authored Dec 19, 2024
2 parents 72d8ca5 + 743b6d9 commit 27dbd21
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions config/generate_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion example/autobind/schema/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type Mutation {

type User {
id: ID!
profile: Profile!
profile: Profile
}

type Profile {
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 27dbd21

Please sign in to comment.