feat: initial Graphile v5 migration - minimal baseline #668
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
feat: initial Graphile v5 migration - minimal baseline
Summary
This PR establishes the foundation for migrating from PostGraphile v4 to v5, including the GraphQL 15→16 upgrade. The approach follows the agreed strategy: disable all plugins and middleware initially to get a minimal working baseline, then incrementally re-enable features.
Core dependency updates:
graphql: 15.10.1 → ^16.9.0postgraphile: ^4.14.1 → ^5.0.0-rc.4graphile-build: ^4.14.1 → ^5.0.0-rc.3grafast,grafserv,graphile-config,pg-sql2Architecture changes:
graphile-settingsrewritten to use v5 preset pattern (PostGraphileAmberPreset)graphql/server/middleware/graphile.tsrewritten to usepostgraphile()+grafservfor Express integrationgraphql/types/graphile.tsupdated withGraphileConfig.Presetpatterngraphile-cacheupdated for v5 instance structurenode16moduleResolution (required for v5 ESM exports)Temporarily disabled packages (to be migrated incrementally):
graphql/explorer,graphql/codegen,graphql/test,graphql/reactgraphql/playwright-test,graphql/server-testgraphile/graphile-test,packages/cliCI workflow changes:
graphile/*plugin tests (depend on v4 APIs)graphql/*package tests (depend on v4 server)packages/cliandjobs/knative-job-servicetests (depend on graphql packages)Migration plan documented in
docs/plan/graphile-v5-migration.md.Review & Testing Checklist for Human
graphql/server/src/middleware/graphile.tslines 52-53: The context function uses(ctx: unknown)with type assertions - verify this matches the actual grafserv context structure.graphile-settings/src/index.ts: This was rewritten from v4 options to v5 preset pattern - verify the minimal preset configuration is correct.Recommended test plan:
pnpm install && pnpm build(should pass)/graphiqland run a basic queryNotes
The v5 spike repo (constructive-io/graphile) was used as reference for correct patterns but not imported directly.
Link to Devin run: https://app.devin.ai/sessions/0b3cd9962e044fd28cc3cefb5fb61ea4
Requested by: Dan Lynch (@pyramation)