config

package
v0.17.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrConfigFileNotFound = errors.New("config file could not be found, defaults applied")

Functions

This section is empty.

Types

type Config

type Config struct {
	Web                       http.Config                    `yaml:"web"`
	Schema                    schema.Config                  `yaml:"schema"`
	Target                    proxy.Config                   `yaml:"target"`
	PersistedOperations       trusteddocuments.Config        `yaml:"persisted_operations"`
	ObfuscateValidationErrors bool                           `yaml:"obfuscate_validation_errors"`
	ObfuscateUpstreamErrors   bool                           `yaml:"obfuscate_upstream_errors"`
	BlockFieldSuggestions     block_field_suggestions.Config `yaml:"block_field_suggestions"`
	MaxTokens                 tokens.Config                  `yaml:"max_tokens"`
	MaxAliases                aliases.Config                 `yaml:"max_aliases"`
	EnforcePost               enforce_post.Config            `yaml:"enforce_post"`
	MaxDepth                  max_depth.Config               `yaml:"max_depth"`
	MaxBatch                  batch.Config                   `yaml:"max_batch"`
	AccessLogging             accesslogging.Config           `yaml:"access_logging"`
	Log                       log.Config                     `yaml:"log"`
	LogGraphqlErrors          bool                           `yaml:"log_graphql_errors"`
}

func NewConfig

func NewConfig(configPath string) (*Config, error)

NewConfig initializes the runtime configuration. It uses defaults, and applies any user overrides to it If no configuration file can be found, the defaults will be returned the ErrConfigFileNotFound error if the configuration file can be found, but cannot be unmarshalled, an error will be returned

func (Config) String added in v0.17.0

func (c Config) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL