Documentation
¶
Overview ¶
Package config provides router configuration types, parsing, and schema output.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SchemaJSON ¶
func SchemaJSON() string
SchemaJSON returns a JSON Schema document describing the router configuration. The schema body lives in schema.json and is loaded via go:embed at compile time.
Types ¶
type APQ ¶
type APQ struct {
Enabled bool `yaml:"enabled"`
}
APQ configures Automatic Persisted Queries.
type CORS ¶
type CORS struct {
AllowCredentials bool `yaml:"allow_credentials"`
AllowMethods []string `yaml:"allow_methods"`
ExposeHeaders []string `yaml:"expose_headers"`
AllowHeaders []string `yaml:"allow_headers"`
AllowOrigins []string `yaml:"allow_origins"`
}
CORS configures cross-origin resource sharing.
type Config ¶
type Config struct {
Supergraph Supergraph `yaml:"supergraph"`
HealthCheck HealthCheck `yaml:"health_check"`
Homepage Homepage `yaml:"homepage"`
Sandbox Sandbox `yaml:"sandbox"`
CORS CORS `yaml:"cors"`
APQ APQ `yaml:"apq"`
Batching Batching `yaml:"batching"`
}
Config is the top-level router configuration.
type HealthCheck ¶
type HealthCheck struct {
Listen string `yaml:"listen"`
Enabled bool `yaml:"enabled"`
Path string `yaml:"path"`
}
HealthCheck configures the health check endpoint.
type Homepage ¶
type Homepage struct {
Enabled bool `yaml:"enabled"`
}
Homepage configures the landing page served at the GraphQL path.
type Sandbox ¶
type Sandbox struct {
Enabled bool `yaml:"enabled"`
}
Sandbox configures the Apollo Sandbox explorer UI.
type Supergraph ¶
type Supergraph struct {
Listen string `yaml:"listen"`
Path string `yaml:"path"`
Introspection bool `yaml:"introspection"`
DeferSupport bool `yaml:"defer_support"`
ConnectionShutdownTimeout string `yaml:"connection_shutdown_timeout"`
}
Supergraph configures the main GraphQL endpoint.
Click to show internal directories.
Click to hide internal directories.