Skip to content

Add temporary scoped Graphile introspection - #1711

Closed
Zetazzz wants to merge 1 commit into
mainfrom
feat/temporary-scoped-introspection
Closed

Add temporary scoped Graphile introspection#1711
Zetazzz wants to merge 1 commit into
mainfrom
feat/temporary-scoped-introspection

Conversation

@Zetazzz

@Zetazzz Zetazzz commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Stack

This is PR 1 of 3 and targets main.

  1. Add temporary scoped Graphile introspection #1711 — temporary scoped introspection (this PR)
  2. Own build-state retirement policy in CNC #1712 — build-state retirement
  3. Add scoped retirement performance matrix #1713 — focused performance harness

Summary

  • add an explicit stock / scoped-required PostgreSQL introspection mode to makePgService
  • add schema-scoped catalog queries with either complete catalog types or dependency-closure types
  • validate required and allowed namespaces and referenced type closure fail-closed
  • add exact node-postgres introspection-client reuse/destroy semantics and capability checks
  • keep scoped raw introspection cache state limited to the gather that consumed it

Motivation

The stock Graphile catalog query inspects substantially more PostgreSQL catalog state than a service exposing a bounded schema set needs. This introduces an explicit scoped path while preserving the stock path as the default and as the comparison baseline.

This is intentionally an interim pnpm-patch implementation. Graphile's planned progressive introspection should provide the upstream replacement; once it is available and validated, these patches and wrapper settings can be removed in favor of that implementation.

Behavior and compatibility

  • defaults remain introspectionMode: 'stock' and introspectionClientReleaseMode: 'reuse'
  • scoped introspection must be explicitly requested
  • scoped catalog type and capability settings are rejected in stock mode
  • missing required schemas, unapproved dependency schemas, or incomplete type closure fail the build
  • no application plugin behavior changes in this PR

Validation

  • graphile-settings service, runtime, cache-lifecycle, and exact-client-release tests
  • graphql/server scoped-introspection middleware tests
  • targeted package builds, type checks, and lint
  • frozen-lockfile install

The focused test run covered 24 assertions across the settings and server suites.

Zetazzz commented Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

Closing as superseded by the replacement performance stack. #1716 provides the reusable performance harness, and #1719 replaces this temporary patch-based scoped introspection implementation with the zero-patch CNC-owned package. This PR remains available as historical design context.

@Zetazzz Zetazzz closed this Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant