feat: initial Graphile v5 migration - minimal baseline#669
Draft
pyramation wants to merge 108 commits intomainfrom
Draft
feat: initial Graphile v5 migration - minimal baseline#669pyramation wants to merge 108 commits intomainfrom
pyramation wants to merge 108 commits intomainfrom
Conversation
This commit establishes the foundation for migrating from Graphile v4 to v5: Core changes: - Update graphql from 15.10.1 to ^16.9.0 - Update postgraphile from ^4.14.1 to ^5.0.0-rc.4 - Update graphile-build from ^4.14.1 to ^5.0.0-rc.3 - Add new v5 dependencies: grafast, grafserv, graphile-config, pg-sql2 Architecture changes: - Rewrite graphile-settings to use v5 preset pattern (PostGraphileAmberPreset) - Update graphile-cache for v5 instance structure (pgl, serv, handler) - Rewrite graphql/server middleware to use v5 postgraphile() and grafserv - Update graphql/types with GraphileConfig.Preset pattern - Use node16 moduleResolution for v5 ESM exports Temporarily disabled packages (to be migrated incrementally): - graphql/explorer - graphql/codegen - graphql/test - graphql/react - graphile/graphile-test - packages/cli The server middleware now uses: - v5 preset-based configuration - grafserv for Express integration - grafast context for request context (replacing pgSettings function) - Direct SQL queries in api.ts (replacing graphile-query) Next steps documented in docs/plan/graphile-v5-migration.md
Temporarily disabled in CI workflow: - All graphile/* plugin tests (depend on v4 APIs) - All graphql/* package tests (depend on v4 server) - packages/cli and jobs/knative-job-service (depend on graphql packages) Also disabled builds for: - graphql/playwright-test - graphql/server-test These will be re-enabled incrementally as each package is migrated to v5.
This allows PRs targeting develop-v5 to run CI tests, making it suitable as a long-lived development branch for the v5 migration.
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
All tests are temporarily disabled on the develop-v5 branch. They will be re-enabled when v5 is ready to merge into main.
This is a test PR to verify that PRs targeting develop-v5 run CI correctly.
These tests depend on graphile-test and use v4 API patterns. They will be rewritten for v5 as part of the migration.
…rver-ci test: re-enable graphql/server test in CI
upgrade related graphile plugins removed some graphile plugins for now
feat: inline pg-type-mappings plugin into graphile-settings
Migration/fulltext filter
The browserCompatible option was already removed from the codegen package during the v5 migration but the CLI wrapper still referenced it. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace _meta references with standard introspection in comments and docstrings. Mark legacy v4 exports (QueryBuilder, MetaObject, generators) as @deprecated. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add test for FulltextSearch entity detection from introspection to verify search plugin entities are handled correctly. Add multi-entity findOne collection fallback test for NoUniqueLookupPreset scenarios. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add search plugin integration and post-rebase verification to handover - Mark all 5 codegen migration workstreams as complete - Update graphile plugin inventory (search, pg-type-mappings complete) - Update Phase 7 codegen status to reflect completion Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Custom mutation hooks were casting the select argument with HookStrictSelect when passing to ORM methods, but ORM expects StrictSelect. This caused TS2345 errors in generated output. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
PostGraphile v5 uses e.g. "userPatch" not "patch" in UpdateUserInput. Infer from introspection and thread through hooks, ORM, and query-builder.
…ole hooks Add SessionInfo, ExtendTokenButton, AuditLogList, EmailList, RoleTypeList components and enhance CheckPasswordForm with verifyPassword toggle. Add 4 new live integration tests for scalar queries, token extension, audit logs, and emails.
…op-v5 (WIP) Feat/codegen v5 on develop v5
…se-enum-values fix(graphile-settings): uppercase enum values to match v4 CONSTANT_CASE convention
fix meta schema plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR establishes the foundation for migrating from PostGraphile v4 to v5, including the GraphQL 15→16 upgrade. The approach follows an incremental strategy: disable all plugins and middleware initially to get a minimal working baseline, then re-enable features incrementally in follow-up PRs.
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 integrationgraphile-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:
develop-v5branch to workflow triggers for long-lived developmentMigration plan documented in
docs/plan/graphile-v5-migration.md.Review & Testing Checklist for Human
/graphiqlif available.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 at runtime.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)