mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-15 04:26:37 +00:00
cmd/geth: respect --graphql=false (#34914)
Passing `--graphql=false` currently still registers the GraphQL handler because the startup path checks whether the flag was set, not its boolean value. This switches the registration condition to use `ctx.Bool`, so explicit false disables GraphQL while the default behavior remains unchanged.
This commit is contained in:
parent
b927ff8b53
commit
2ca3a6447d
1 changed files with 1 additions and 1 deletions
|
|
@ -270,7 +270,7 @@ func makeFullNode(ctx *cli.Context) *node.Node {
|
||||||
filterSystem := utils.RegisterFilterAPI(stack, backend, &cfg.Eth)
|
filterSystem := utils.RegisterFilterAPI(stack, backend, &cfg.Eth)
|
||||||
|
|
||||||
// Configure GraphQL if requested.
|
// Configure GraphQL if requested.
|
||||||
if ctx.IsSet(utils.GraphQLEnabledFlag.Name) {
|
if ctx.Bool(utils.GraphQLEnabledFlag.Name) {
|
||||||
utils.RegisterGraphQLService(stack, backend, filterSystem, &cfg.Node)
|
utils.RegisterGraphQLService(stack, backend, filterSystem, &cfg.Node)
|
||||||
}
|
}
|
||||||
// Add the Ethereum Stats daemon if requested.
|
// Add the Ethereum Stats daemon if requested.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue