internal/

directory
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: MIT

Directories

Path Synopsis
Package cache (de)serializes the introspected Catalog so pdbq can boot without touching pg_catalog: gzip-compressed JSON with a format version and a content hash for drift detection (`pdbq schema dump|check`).
Package cache (de)serializes the introspected Catalog so pdbq can boot without touching pg_catalog: gzip-compressed JSON with a format version and a content hash for drift detection (`pdbq schema dump|check`).
Package compile turns one validated GraphQL root field into exactly one parameterized SQL statement, PostGraphile-style: nested selections become jsonb_build_object trees, relations become LEFT JOIN LATERAL subqueries, lists become jsonb_agg — so the database returns the response JSON directly and there is no N+1 problem to paper over.
Package compile turns one validated GraphQL root field into exactly one parameterized SQL statement, PostGraphile-style: nested selections become jsonb_build_object trees, relations become LEFT JOIN LATERAL subqueries, lists become jsonb_agg — so the database returns the response JSON directly and there is no N+1 problem to paper over.
Package config defines pdbq's configuration model and its loading rules: YAML file < environment (PDBQ_*) < command-line flags.
Package config defines pdbq's configuration model and its loading rules: YAML file < environment (PDBQ_*) < command-line flags.
Package exec owns the request lifecycle: parse/validate, depth and cost limits, per-operation transactions, RLS role switching + claims via set_config, execution of compiled statements, and PG->GraphQL error mapping.
Package exec owns the request lifecycle: parse/validate, depth and cost limits, per-operation transactions, RLS role switching + claims via set_config, execution of compiled statements, and PG->GraphQL error mapping.
Package inflect defines the naming pipeline for every generated GraphQL identifier.
Package inflect defines the naming pipeline for every generated GraphQL identifier.
Package introspect reads pg_catalog and produces a Catalog — the single serializable model that drives schema building, caching, and plugins.
Package introspect reads pg_catalog and produces a Catalog — the single serializable model that drives schema building, caching, and plugins.
Package plugin defines the hook surfaces and the ordered registry.
Package plugin defines the hook surfaces and the ordered registry.
plugins
advancedfilters
Package advancedfilters is a built-in plugin extending the generated filter/orderBy surface with two features default generation leaves out:
Package advancedfilters is a built-in plugin extending the generated filter/orderBy surface with two features default generation leaves out:
nestedmutations
Package nestedmutations is a built-in plugin exercising every hook surface: it adds nested `create`/`connect` input fields on create-mutation inputs following foreign keys (SchemaHook), compiles them into a single multi-CTE SQL statement respecting FK direction and insertion order (CompileHook), and forces a transaction for nested mutations even when transactions are globally disabled (RequestHook), unless plugins.nested-mutations.force_transactions is false.
Package nestedmutations is a built-in plugin exercising every hook surface: it adds nested `create`/`connect` input fields on create-mutation inputs following foreign keys (SchemaHook), compiles them into a single multi-CTE SQL statement respecting FK direction and insertion order (CompileHook), and forces a transaction for nested mutations even when transactions are globally disabled (RequestHook), unless plugins.nested-mutations.force_transactions is false.
simplenames
Package simplenames is a built-in plugin proving that naming is fully hook-driven: `users` instead of `allUsers`, `user(id:)` instead of `userById`, `updateUser` instead of `updateUserById`, and shortened relation names where unambiguous.
Package simplenames is a built-in plugin proving that naming is fully hook-driven: `users` instead of `allUsers`, `user(id:)` instead of `userById`, `updateUser` instead of `updateUserById`, and shortened relation names where unambiguous.
smartcomments
Package smartcomments is a built-in plugin that turns PostGraphile-style "smart comments" — database COMMENTs whose leading lines start with '@' — into schema customization, so the generated API can be tuned with plain DDL and no pdbq configuration:
Package smartcomments is a built-in plugin that turns PostGraphile-style "smart comments" — database COMMENTs whose leading lines start with '@' — into schema customization, so the generated API can be tuned with plain DDL and no pdbq configuration:
Package schema turns an introspect.Catalog into a GraphQL schema.
Package schema turns an introspect.Catalog into a GraphQL schema.
Package server exposes the GraphQL API over HTTP: POST /graphql, an embedded GraphiQL page, and health endpoints.
Package server exposes the GraphQL API over HTTP: POST /graphql, an embedded GraphiQL page, and health endpoints.
Package smarttags parses PostGraphile-style "smart comments": lines at the start of a database COMMENT beginning with '@' are machine-readable tags, everything after the first non-tag line is the human description.
Package smarttags parses PostGraphile-style "smart comments": lines at the start of a database COMMENT beginning with '@' are machine-readable tags, everything after the first non-tag line is the human description.
Package testutil provides a hand-built fixture Catalog mirroring the docker fixture schema, so schema-builder and compiler tests run without a database.
Package testutil provides a hand-built fixture Catalog mirroring the docker fixture schema, so schema-builder and compiler tests run without a database.
Package watch re-introspects on DDL changes (dev mode).
Package watch re-introspects on DDL changes (dev mode).

Jump to

Keyboard shortcuts

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