Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,26 @@ becomes the release notes of the next tag.
a database error in one query root field no longer fails the later fields
with `pg:25P02` or adds a pathless `internal` error logged at `ERROR`: the
query runs again with each root field in its own savepoint.
- Removed config keys (`transactions.mutations`,
`plugins.settings.nested_mutations.force_transactions`) are reported with
the reason they were removed, and `transactions.isolation` errors name
the accepted values ([upgrading](docs/upgrading.md#config-messages-and-embedding-api-pdbcore-api-hygiene)).
- `PDBQ_*` variables that double the underscore right after a section
(`PDBQ_ROLES__ALLOWED`) are errors with a did-you-mean hint instead of
being ignored; `database.connect_timeout`, `database.max_conns`,
`database.statement_timeout`, `auth.jwt.jwks_cache_ttl` (with a JWKS URL)
and `watch.poll_interval` (with the watch on) are validated.
- `pdbq.LoadConfig` takes command-line values as `map[string]any` instead of
a `*pflag.FlagSet`.
- The `@omit` / `@behavior` checks use pdbcore's shared smart-tag
vocabulary, so pdbq and pdbr warn about the same comments.
- Built against pdbcore's API hygiene changes (see its changelog).

### Fixed

- A live boot no longer alphabetises `schema.schemas` in place; type names
resolve through the schemas in their configured order, as on a
schema-cache boot.

## [0.30.0] - 2026-11-24

Expand Down
5 changes: 3 additions & 2 deletions cmd/pdbq/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (

"github.com/suprbdev/pdbcore/cache"
"github.com/suprbdev/pdbcore/confx"
"github.com/suprbdev/pdbcore/confx/cliflags"
pgcontrib "github.com/suprbdev/pdbcore/contrib"
"github.com/suprbdev/pdbcore/pgexec"
"github.com/suprbdev/pdbq"
Expand Down Expand Up @@ -128,14 +129,14 @@ func loadConfig(cmd *cobra.Command) (config.Config, error) {
// changedConfigFlags returns the config flags the user set on cmd. Config
// flags are named after dotted koanf paths; command-local flags (--config,
// --output, --var, ...) have no dot and stay out of the config.
func changedConfigFlags(cmd *cobra.Command) *flag.FlagSet {
func changedConfigFlags(cmd *cobra.Command) map[string]any {
var local []string
cmd.Flags().VisitAll(func(f *flag.Flag) {
if !strings.Contains(f.Name, ".") {
local = append(local, f.Name)
}
})
return confx.ChangedFlags(cmd.Flags(), local...)
return cliflags.Changed(cmd.Flags(), local...)
}

// loadCLIConfig loads the config of a command that runs without an HTTP
Expand Down
6 changes: 3 additions & 3 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ same names: `limits.*` (`max_body_bytes`, `max_depth`, `max_cost`,
| Key | Default | Notes |
|---|---|---|
| `database.url` | — | required |
| `database.max_conns` | 10 | maximum pooled connections |
| `database.connect_timeout` | `10s` | timeout for establishing a connection |
| `database.max_conns` | 10 | maximum pooled connections; `0` uses the pgx pool default, negative is an error |
| `database.connect_timeout` | `10s` | timeout for establishing a connection; must be positive |
| `database.statement_timeout` | `25s` | per-statement timeout on every request (`0` disables); kept below `server.request_timeout` so a slow statement fails with SQLSTATE `57014` (code `pg:57014`) before the request is cut off |
| `server.addr` | `:8080` | |
| `server.graphiql` | `false` | GraphiQL playground at `/` (enable for dev) |
Expand Down Expand Up @@ -128,7 +128,7 @@ same names: `limits.*` (`max_body_bytes`, `max_depth`, `max_cost`,
| `transactions.partial.enabled` | `false` | let a request opt in (`extensions.partialMutations`) to running each mutation root field in its own savepoint, so a failing field does not roll back the others; see [Mutations](mutations.md#partial-success). Same key as pdbr's partial bulk writes |
| `transactions.partial.max_items` | 1000 | most mutation root fields a partial request may have (each is a statement and a savepoint); more is rejected; must be `>= 1` |
| `watch.enabled` | `false` | dev only; refuses to combine with cache |
| `watch.poll_interval` | `5s` | fallback polling when event triggers can't be installed |
| `watch.poll_interval` | `5s` | fallback polling when event triggers can't be installed; must be positive when `watch.enabled` |
| `watch.channel` | `pdbq_ddl` | NOTIFY channel used by the DDL event trigger |
| `errors.detail` | `prod` | `dev` exposes full PG error detail; `strict` hides even constraint-violation messages; status and `extensions.code` never change ([errors.md](errors.md)) |
| `plugins.disabled` | `[]` | built-in plugin names to disable: `smart_comments`, `simple_names`, `advanced_filters`, `postgis`, `contrib`, `aggregates`, `nested_mutations`; any other name is an error (with a "did you mean" hint) |
Expand Down
29 changes: 29 additions & 0 deletions docs/upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -418,3 +418,32 @@ values they send; databases rename deprecated behavior tokens.
| `@behavior -filter` / `-order` | `@behavior -filterBy` / `-orderBy` (PostGraphile V5) | the old tokens still work with a build-time deprecation warning |
| `@filterable` (alias `@sortable`) on foreign keys and computed columns under `relations_opt_in` / `computed_opt_in` admitted both filters and orderings | `@filterable` admits the filter surface, `@sortable` the orderBy surface | tag both to keep both; on columns either tag still admits both past `filters.indexed_only` |
| unknown `@omit` actions and `@behavior` tokens were ignored silently | ignored with a build-time warning naming the object and the token | `@omit reed` no longer goes unnoticed |

### Config messages and embedding API (pdbcore API hygiene)

- **Removed keys say so.** `transactions.mutations` and
`plugins.settings.nested_mutations.force_transactions` (and their
`PDBQ_*` variables) are reported as
`unknown key transactions.mutations: removed: mutations always run in a transaction`
instead of a bare "unknown key".
- **Doubled underscores after a section are errors.** `PDBQ_ROLES__ALLOWED`
(and the like) used to be ignored silently, so the setting kept its
default; it is now `unknown environment variable PDBQ_ROLES__ALLOWED
(roles_allowed): did you mean PDBQ_ROLES_ALLOWED?`.
- **New checks:** `database.connect_timeout` must be positive (`0` waited
forever), `database.max_conns` and `database.statement_timeout` must not
be negative, `auth.jwt.jwks_cache_ttl` must be positive with
`auth.jwt.jwks_url` (`0` silently meant one hour), and
`watch.poll_interval` must be positive with `watch.enabled` (`0` crashed
the polling fallback).
- **`transactions.isolation` errors name the accepted values:**
`transactions.isolation: "x" is not 'read_committed', 'repeatable_read' or 'serializable'`
(was `"x" invalid`).
- **Embedding.** `pdbq.LoadConfig(path, flags)` takes the command-line
values as `map[string]any` (koanf path to value) instead of a
`*pflag.FlagSet`; build it from a pflag set with
`cliflags.Changed(fs, except...)` from
`github.com/suprbdev/pdbcore/confx/cliflags`.
- The smart-comment checks (unknown `@omit` actions, unknown and deprecated
`@behavior` tokens) now come from pdbcore and are shared with pdbr; the
warnings are unchanged.
6 changes: 3 additions & 3 deletions examples/pdbq.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
database:
# PostgreSQL connection URL, e.g. postgres://user:pass@host:5432/db. Also honours standard PG* env vars when empty.
url: ""
# Maximum pooled connections.
# Maximum pooled connections; 0 uses the pgx pool default (the larger of 4 and the number of CPUs).
max_conns: 10
# Timeout for establishing a connection.
# Timeout for establishing a connection (must be positive).
connect_timeout: "10s"
# Per-statement timeout applied to every request (0 disables). Keep it below the HTTP request timeout so a slow statement fails with SQLSTATE 57014 (a timeout error the client can act on) before the request is cut off.
statement_timeout: "25s"
Expand Down Expand Up @@ -223,7 +223,7 @@ transactions:
watch:
# Re-introspect and hot-swap the schema on DDL changes (dev only; refuses to combine with schema.cache_path).
enabled: false
# Poll interval used when event triggers cannot be installed.
# Poll interval used when event triggers cannot be installed (must be positive).
poll_interval: "5s"
# NOTIFY channel used by the DDL event trigger.
channel: "pdbq_ddl"
Expand Down
16 changes: 10 additions & 6 deletions facade.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import (
"fmt"
"net/http"

flag "github.com/spf13/pflag"

"github.com/suprbdev/pdbcore/confx"
"github.com/suprbdev/pdbcore/introspect"
"github.com/suprbdev/pdbcore/watch"
Expand Down Expand Up @@ -59,8 +57,9 @@ type (
func DefaultConfig() Config { return config.DefaultConfig() }

// LoadConfig builds the effective config: defaults < YAML < PDBQ_* env <
// flags (nil flags is fine).
func LoadConfig(path string, flags *flag.FlagSet) (Config, error) {
// flags, given as koanf path to value (nil is fine; cliflags.Changed in
// github.com/suprbdev/pdbcore/confx/cliflags reads them from a pflag set).
func LoadConfig(path string, flags map[string]any) (Config, error) {
return config.Load(path, flags)
}

Expand Down Expand Up @@ -311,15 +310,20 @@ func (a *App) installLive(ctx context.Context, t *live.Tracker) {
// calling rebuild with every changed catalog.
func (a *App) startWatch(ctx context.Context, catHash string, rebuild func(context.Context, *introspect.Catalog)) {
wctx, cancel := context.WithCancel(ctx)
w := &watch.Watcher{
w, err := watch.New(watch.Config{
Pool: a.pool,
Schemas: a.Config.Schema.Schemas,
Channel: a.Config.Watch.Channel,
TriggerName: "pdbq_watch",
InitialHash: catHash,
PollInterval: a.Config.Watch.PollInterval,
Log: a.Log,
OnChange: func(cat *introspect.Catalog) { rebuild(wctx, cat) },
OnChange: rebuild,
})
if err != nil {
cancel()
a.Log.Error("watch: not started", "err", err)
return
}
done := make(chan struct{})
go func() {
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ require (
github.com/knadh/koanf/parsers/yaml v1.1.0 // indirect
github.com/knadh/koanf/providers/env v1.1.0 // indirect
github.com/knadh/koanf/providers/file v1.2.1 // indirect
github.com/knadh/koanf/providers/posflag v1.0.1 // indirect
github.com/knadh/koanf/v2 v2.3.5 // indirect
github.com/spf13/cobra v1.10.2
github.com/spf13/pflag v1.0.10
Expand Down Expand Up @@ -42,5 +41,5 @@ require (
require (
github.com/coder/websocket v1.8.15
github.com/prometheus/client_golang v1.25.0
github.com/suprbdev/pdbcore v0.18.0
github.com/suprbdev/pdbcore v0.19.0
)
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ github.com/knadh/koanf/providers/env v1.1.0 h1:U2VXPY0f+CsNDkvdsG8GcsnK4ah85WwWy
github.com/knadh/koanf/providers/env v1.1.0/go.mod h1:QhHHHZ87h9JxJAn2czdEl6pdkNnDh/JS1Vtsyt65hTY=
github.com/knadh/koanf/providers/file v1.2.1 h1:bEWbtQwYrA+W2DtdBrQWyXqJaJSG3KrP3AESOJYp9wM=
github.com/knadh/koanf/providers/file v1.2.1/go.mod h1:bp1PM5f83Q+TOUu10J/0ApLBd9uIzg+n9UgthfY+nRA=
github.com/knadh/koanf/providers/posflag v1.0.1 h1:EnMxHSrPkYCFnKgBUl5KBgrjed8gVFrcXDzaW4l/C6Y=
github.com/knadh/koanf/providers/posflag v1.0.1/go.mod h1:3Wn3+YG3f4ljzRyCUgIwH7G0sZ1pMjCOsNBovrbKmAk=
github.com/knadh/koanf/v2 v2.3.5 h1:2dXJUYaKGm4SGYeoAtBviq9+02JZo/pxQ2ssOd60rJg=
github.com/knadh/koanf/v2 v2.3.5/go.mod h1:gRb40VRAbd4iJMYYD5IxZ6hfuopFcXBpc9bbQpZwo28=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
Expand Down Expand Up @@ -72,8 +70,8 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE=
github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg=
github.com/suprbdev/pdbcore v0.18.0 h1:3sptk5S+ffSLIQmvTVd74rL6NjUHQ2zql91lHnFkH1Q=
github.com/suprbdev/pdbcore v0.18.0/go.mod h1:FNV4SnduAkZoFDBZ7PRGXcSjELkHjA9mURORywAVHlc=
github.com/suprbdev/pdbcore v0.19.0 h1:0j+vkzyt1bKcREPh6OUT9vX69dzL5QMzAAJvd1Ck+KM=
github.com/suprbdev/pdbcore v0.19.0/go.mod h1:loM9g7/i1GhIY4CRmHeAiMucJ57nxTgxN0YNHc7tW7w=
github.com/vektah/gqlparser/v2 v2.5.36 h1:CN9mKVHgMkc+XftdOWIhb4HEL8wKSYkFAqhf8booa7s=
github.com/vektah/gqlparser/v2 v2.5.36/go.mod h1:cAJ9qwVgPaUkWv6Gn8vn0mqOE0Ui5Pn56wNy5396XWo=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
Expand Down
2 changes: 1 addition & 1 deletion internal/compile/aggregates.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func (s *stmt) groupKeyText(expr string, c *introspect.Column) string {
return "to_jsonb(" + expr + ")::text"
}
if postgis.FlavourOf(c.PGType).Spatial() {
return "to_jsonb(" + postgis.OutputSQL(expr) + ") #>> '{}'"
return "to_jsonb(" + postgis.OutputSQL(expr, postgis.Output{}) + ") #>> '{}'"
}
return "to_jsonb(" + s.exprJSON(expr, c) + ") #>> '{}'"
}
Expand Down
4 changes: 2 additions & 2 deletions internal/compile/rows.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func arrayJSON(ref string, c *introspect.Column) string {
func (s *stmt) spatialArrayJSON(ref string) string {
elem := s.alias("g")
return fmt.Sprintf("CASE WHEN %s IS NULL THEN NULL ELSE (SELECT coalesce(json_agg(%s ORDER BY %s.o), '[]'::json) FROM (SELECT generate_subscripts(%s, 1) AS o) AS %s) END",
ref, postgis.OutputJSONSQL("("+ref+")["+elem+".o]"), elem, ref, elem)
ref, postgis.OutputSQL("("+ref+")["+elem+".o]", postgis.Output{JSON: true}), elem, ref, elem)
}

// exprJSON renders a scalar value expression for inclusion in the JSON
Expand All @@ -254,7 +254,7 @@ func (s *stmt) exprJSON(ref string, c *introspect.Column) string {
if postgis.FlavourOf(c.PGType).Spatial() {
// PostGIS values render as WKB hex by default; the GeoJSON scalar
// contract is a real JSON object.
return postgis.OutputJSONSQL(ref)
return postgis.OutputSQL(ref, postgis.Output{JSON: true})
}
switch c.PGType {
case "int8", "numeric", "money":
Expand Down
10 changes: 5 additions & 5 deletions internal/compile/spatial.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/suprbdev/pdbcore/postgis"
)

// spatialOp compiles one operator of a PostGIS filter (see postgis.Ops).
// spatialOp compiles one operator of a PostGIS filter (see postgis.Ops()).
//
// Every operand — GeoJSON geometry, bounding-box corner, distance — travels as
// a bind parameter. The SQL text depends only on which operator was used and
Expand Down Expand Up @@ -283,9 +283,9 @@ func (s *stmt) spatialFieldSQL(alias string, c *introspect.Column, f *ast.Field,
return s.typedGeometryDigitsSQL(expr, digits, gt, f.SelectionSet, depth)
}
if digits != "" {
return postgis.OutputJSONPrecisionSQL(expr, digits), nil
return postgis.OutputSQL(expr, postgis.Output{JSON: true, Precision: digits}), nil
}
return postgis.OutputJSONSQL(expr), nil
return postgis.OutputSQL(expr, postgis.Output{JSON: true}), nil
}

// spatialDerivedSQL renders a derived spatial accessor field (locationArea,
Expand All @@ -295,7 +295,7 @@ func (s *stmt) spatialDerivedSQL(alias string, c *introspect.Column, suffix stri
if !ok {
return "", fmt.Errorf("compile: unknown spatial accessor %q", suffix)
}
return d.JSONSQL(alias+"."+quoteIdent(c.Name), postgis.FlavourOf(c.PGType)), nil
return d.SQL(alias+"."+quoteIdent(c.Name), postgis.FlavourOf(c.PGType), postgis.Output{JSON: true}), nil
}

// rasterAccessorSQL renders a raster metadata accessor field (rastWidth,
Expand All @@ -305,7 +305,7 @@ func (s *stmt) rasterAccessorSQL(alias string, c *introspect.Column, suffix stri
if !ok {
return "", fmt.Errorf("compile: unknown raster accessor %q", suffix)
}
return a.JSONSQL(alias + "." + quoteIdent(c.Name)), nil
return a.SQL(alias+"."+quoteIdent(c.Name), postgis.Output{JSON: true}), nil
}

// rasterBand binds the 1-based band number of a raster field's band:
Expand Down
4 changes: 2 additions & 2 deletions internal/compile/typedgeo.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ func (s *stmt) typedGeometrySQL(expr string, t geotype.Type, sel ast.SelectionSe
// object (x, y, points, geojson, ...) carries the same precision.
func (s *stmt) typedGeometryDigitsSQL(expr, digits string, t geotype.Type, sel ast.SelectionSet, depth int) (string, error) {
ctx := geoCtx{dims: quoteLiteral(t.Dims.Suffix())}
geojson := postgis.OutputJSONSQL(geoValue + ".g")
geojson := postgis.OutputSQL(geoValue+".g", postgis.Output{JSON: true})
if digits != "" {
geojson = postgis.OutputJSONPrecisionSQL(geoValue+".g", digits)
geojson = postgis.OutputSQL(geoValue+".g", postgis.Output{JSON: true, Precision: digits})
}
cols := fmt.Sprintf("%s AS j, ST_SRID(%s.g) AS srid", geojson, geoValue)
if t.AnyDims {
Expand Down
26 changes: 17 additions & 9 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"strings"
"time"

flag "github.com/spf13/pflag"
"github.com/suprbdev/pdbcore/auth"
"github.com/suprbdev/pdbcore/confx"
pgcontrib "github.com/suprbdev/pdbcore/contrib"
Expand Down Expand Up @@ -356,13 +355,21 @@ func DefaultConfig() Config {
// ClaimHeaderPrefix is the default auth.headers.prefix.
const ClaimHeaderPrefix = "X-Pdbq-Claim-"

// RemovedKeys maps pdbq keys removed before 1.0 without a replacement to
// the reason, so loading an old config says why the key is unknown.
var RemovedKeys = map[string]string{
"transactions.mutations": "mutations always run in a transaction",
"plugins.settings.nested_mutations.force_transactions": "nested mutations always run in a transaction",
}

// Load builds the effective config: defaults, then optional YAML file, then
// PDBQ_* env vars, then flags (highest precedence), and validates it. Pass
// only the flags the user set (confx.ChangedFlags) so unset flags do not
// shadow YAML/env. Loading is strict: unknown keys in the file, and unknown
// PDBQ_* variables inside a config section, are errors naming the key they
// moved to or the closest valid key.
func Load(path string, flags *flag.FlagSet) (Config, error) {
// PDBQ_* env vars, then flags (highest precedence: koanf path to value,
// see confx.WithFlags), and validates it. Pass only the flags the user set
// (cliflags.Changed) so unset flags do not shadow YAML/env. Loading is
// strict: unknown keys in the file, and unknown PDBQ_* variables inside a
// config section, are errors naming the key they moved to, why they were
// removed, or the closest valid key.
func Load(path string, flags map[string]any) (Config, error) {
cfg, err := LoadUnvalidated(path, flags)
if err != nil {
return cfg, err
Expand All @@ -375,9 +382,9 @@ func Load(path string, flags *flag.FlagSet) (Config, error) {

// LoadUnvalidated is Load without the final Validate, for callers that
// override keys before validating (see [Config.ConnectionIdentity]).
func LoadUnvalidated(path string, flags *flag.FlagSet) (Config, error) {
func LoadUnvalidated(path string, flags map[string]any) (Config, error) {
cfg := DefaultConfig()
if err := confx.Load("PDBQ_", path, flags, &cfg, confx.WithMoved(MovedKeys)); err != nil {
if err := confx.Load("PDBQ_", path, &cfg, confx.WithMoved(MovedKeys), confx.WithRemoved(RemovedKeys), confx.WithFlags(flags)); err != nil {
return cfg, err
}
return cfg, nil
Expand All @@ -395,6 +402,7 @@ func (c *Config) ConnectionIdentity() {
// Validate checks cross-field invariants.
func (c *Config) Validate() error {
var errs []string
errs = append(errs, confx.ValidateDatabase(c.Database)...)
errs = append(errs, confx.ValidateErrors(c.Errors)...)
errs = append(errs, confx.ValidateIdentity(c.Auth, c.Roles, c.Claims)...)
errs = append(errs, confx.ValidateTX(confx.TX{Isolation: c.TX.Isolation, MaxRetries: c.TX.MaxRetries})...)
Expand Down
6 changes: 5 additions & 1 deletion internal/config/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ func ExampleYAML() string {
b.WriteString("# Generated by `pdbq config example` from the config structs — reference, not for direct use.\n")
b.WriteString("# Every key is also settable via env (PDBQ_SECTION_KEY, double underscore for '_' in names)\n")
b.WriteString("# or command-line flags; precedence is flags > env > file.\n\n")
b.WriteString(confx.ExampleYAML(DefaultConfig()))
b.WriteString(confx.ExampleYAML(DefaultConfig(),
confx.WithDoc("schema.cache_path", "Boot from this schema cache file instead of introspecting (see pdbq schema dump)."),
confx.WithDoc("auth.headers.prefix", "Header prefix mapped to claims, e.g. X-Pdbq-Claim-. The rest of the name maps to one claim (User-Id is user_id); requests with a claim header containing an underscore or other punctuation, repeated, or folding onto another claim header are rejected. The gateway must strip every client-supplied header with this prefix, in any letter case."),
confx.WithDoc("errors.detail", "'dev' exposes full PostgreSQL error detail in GraphQL errors; 'prod' sanitizes but passes constraint-violation and bad-input messages through; 'strict' hides every database error message (constraint and column names never leak)."),
))
return b.String()
}

Expand Down
Loading
Loading