feat: add graphile-authz and postgraphile-plugin-pgvector packages#683
Merged
pyramation merged 5 commits intodevelop-v5from Feb 5, 2026
Merged
feat: add graphile-authz and postgraphile-plugin-pgvector packages#683pyramation merged 5 commits intodevelop-v5from
pyramation merged 5 commits intodevelop-v5from
Conversation
- Add graphile-authz: authorization plugin with declarative rules and SQL generation - Add postgraphile-plugin-pgvector: vector similarity search plugin - Delete graphile-plugin-connection-filter (use community version if needed) - Delete graphile-simple-inflector (inlined in graphile-settings) - Enable both new plugins in GitHub workflow
…nflector - graphile-plugin-connection-filter: use community version postgraphile-plugin-connection-filter@^3.0.0-rc.1 if needed - graphile-simple-inflector: already inlined in graphile-settings as CustomInflectorPlugin
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:
|
- Add jest.config.js for graphile-authz (66 tests passing) - Add jest.config.js for postgraphile-plugin-pgvector - Fix pgvector test imports (use pgsql-test for PgTestClient) - Add pgsql-test as devDependency for pgvector Note: pgvector tests fail due to plugin using traditional resolver instead of Grafast steps - needs conversion to v5 step-based API
- Replace traditional resolve function with Grafast plan function - Use lambda step with grafastContext() to access withPgClient - Use object step to combine field arguments - All 9 pgvector tests now pass
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 adds two PostGraphile v5 plugins from the graphile repo and removes two deprecated packages:
Added:
graphile-authz- Authorization plugin with declarative rules and SQL WHERE clause generation for row-level security. Supports DirectOwner, Membership, OrgHierarchy, Temporal, Publishable, and Composite authorization patterns. 66 tests passing.postgraphile-plugin-pgvector- Vector similarity search plugin supporting COSINE, L2, and IP distance metrics. 9 tests passing.Removed:
graphile-plugin-connection-filter- Use community versionpostgraphile-plugin-connection-filter@^3.0.0-rc.1if neededgraphile-simple-inflector- Already inlined ingraphile-settingsasCustomInflectorPluginBoth new packages are enabled in the GitHub workflow test matrix.
Updates since last revision
lambda,context, andobjectsteps. All 9 tests now pass.jest.config.jsfor both packages (required for ts-jest to handle TypeScript imports)pgsql-testforPgTestClienttypepgsql-testas devDependency for pgvector packageReview & Testing Checklist for Human
graphile-plugin-connection-filterorgraphile-simple-inflectorgraphile/postgraphile-plugin-pgvector/src/plugin.ts- useslambdastep withgrafastContext()to accesswithPgClientsql.rawfor dynamic SQL which generates a warning - this is intentional for building the vector search queryRecommended test plan:
pnpm buildlocally to verify no import errors from deleted packagescd graphile/graphile-authz && pnpm testto verify 66 authz tests passcd graphile/postgraphile-plugin-pgvector && pnpm testto verify 9 pgvector tests passNotes
The graphile-authz package tests are unit tests that verify the SQL generation and rule matching logic without database integration.
The pgvector plugin now uses Grafast's step-based API (
lambda,object,context) instead of traditional GraphQL resolvers, which is required for PostGraphile v5 compatibility.Link to Devin run: https://app.devin.ai/sessions/ba45b64c92bb4307bf9e920123213d9e
Requested by: Dan Lynch (@pyramation)