Skip to content

Commit

Permalink
fix issue with bools
Browse files Browse the repository at this point in the history
  • Loading branch information
oSethoum committed Dec 21, 2022
1 parent 8bde05e commit 2a3c790
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const (
// Default value is nil
func WithMutation(b bool) extensionOption {
return func(e *extension) {
*e.config.Mutation = b
e.config.Mutation = &b
}
}

Expand All @@ -26,15 +26,15 @@ func WithMutation(b bool) extensionOption {
// Default value is nil
func WithSubscription(b bool) extensionOption {
return func(e *extension) {
*e.config.Subscription = b
e.config.Subscription = &b
}
}

// WithEchoServer(b bool) enables entgqlplus to generate the server, routes and the handlers.
// Default value is nil
func WithEchoServer(b bool) extensionOption {
return func(e *extension) {
*e.config.Echo = b
e.config.Echo = &b
}
}

Expand All @@ -43,7 +43,7 @@ func WithEchoServer(b bool) extensionOption {
// Default value is nil
func WithJWTAuth(b bool) extensionOption {
return func(e *extension) {
*e.config.JWT = b
e.config.JWT = &b
}
}

Expand Down Expand Up @@ -83,14 +83,14 @@ func WithConfigPath(p string) extensionOption {
// Default is nil
func WithFileUpload(b bool) extensionOption {
return func(e *extension) {
*e.config.FileUpload = b
e.config.FileUpload = &b
}
}

// WithPrivacy(b bool) adds upload mutation.
// Default is nil
func WithPrivacy(b bool) extensionOption {
return func(e *extension) {
*e.config.Privacy = b
e.config.Privacy = &b
}
}

0 comments on commit 2a3c790

Please sign in to comment.