Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
616dee9
feat: add v5-native graphile-connection-filter plugin
pyramation Mar 12, 2026
eac0208
fix: use filterFieldType instead of filterType in addConnectionFilter…
pyramation Mar 12, 2026
b1ca75d
feat: add ConnectionFilterComputedAttributesPlugin for feature parity
pyramation Mar 12, 2026
ac3d641
refactor: clean up satellite plugin dependencies on connection filter
pyramation Mar 12, 2026
5f77654
Merge origin/main into devin/1773292005-graphile-connection-filter-v5
pyramation Mar 12, 2026
b2e07e9
fix: update test imports and description quotes for graphile-connecti…
pyramation Mar 12, 2026
5744b8b
fix: add graphile-connection-filter devDep to pgvector and skip relat…
pyramation Mar 12, 2026
e8af929
feat: add optional relation filter plugins (forward + backward) with …
pyramation Mar 12, 2026
b4ff740
fix: always include relation plugins, check connectionFilterRelations…
pyramation Mar 12, 2026
28b23c4
feat: enable connectionFilterRelations in constructive preset
pyramation Mar 12, 2026
76f35f5
feat: deprecate condition argument, move search + BM25 plugins to filter
pyramation Mar 13, 2026
10ed4c4
fix: update tests and snapshots for condition deprecation
pyramation Mar 13, 2026
eb9e5b8
fix: provide correct snapshot content for CI (no condition fields)
pyramation Mar 13, 2026
5207254
fix: migrate remaining condition queries to filter, register filterBy…
pyramation Mar 13, 2026
8191c00
fix: allow empty filter objects in pgvector test, add relation filter…
pyramation Mar 13, 2026
e6bc127
fix: delete snapshot to let Jest regenerate with correct relation fil…
pyramation Mar 13, 2026
11f8873
fix: correct schema snapshot with relation filter types, smart quotes…
pyramation Mar 13, 2026
48c8332
fix: add missing blank line between UsersEdge and UserOrderBy in snap…
pyramation Mar 13, 2026
f21d0f0
fix: remove connectionFilterAllowEmptyObjectInput option, handle empt…
pyramation Mar 13, 2026
72ac8fe
feat: tighten TypeScript types in satellite filter plugins
pyramation Mar 13, 2026
58c638a
feat: add connectionFilterRelationsRequireIndex option
pyramation Mar 13, 2026
d5e48ee
feat: add dedicated test suite for graphile-connection-filter
pyramation Mar 13, 2026
5e8da67
fix: add CREATE SCHEMA to seed SQL, make logical operators check runt…
pyramation Mar 13, 2026
9a1ac81
feat: add integration test suite for ConstructivePreset
pyramation Mar 13, 2026
e14bd15
feat: add mega-query test combining BM25 + tsvector + pgvector + rela…
pyramation Mar 13, 2026
b3bdbad
refactor: consolidate CI into single job using postgres-plus:18 for a…
pyramation Mar 13, 2026
4093017
feat: add PostGIS spatial filter (geom intersects bbox) to mega query…
pyramation Mar 13, 2026
592a423
feat: add graphile-pg-trgm-plugin for pg_trgm fuzzy text matching
pyramation Mar 13, 2026
df3d6ce
fix: update schema snapshots for pg_trgm plugin additions
pyramation Mar 13, 2026
d9c8c26
docs: add multi-signal orderBy with thorough comments to mega query test
pyramation Mar 13, 2026
bc8fda5
feat: replace imperative addConnectionFilterOperator with declarative…
pyramation Mar 13, 2026
86ab1f6
fix: aggregate connectionFilterOperatorFactories in ConstructivePrese…
pyramation Mar 13, 2026
b59919a
feat: consolidate graphile-plugin-connection-filter-postgis into grap…
pyramation Mar 13, 2026
bb57932
feat: add runtime tests for array filters, declarative operator facto…
pyramation Mar 13, 2026
9691fa5
fix: correct assertion for multiple operators on same field test (49.…
pyramation Mar 13, 2026
193bf72
chore: rename plugin packages to match algorithms
pyramation Mar 13, 2026
a12ee8a
Merge origin/main into devin/1773429791-v5-filter-system-complete
pyramation Mar 13, 2026
4bf7b77
docs: fix outdated docs and rename bm25 conditionPrefix to filterPrefix
pyramation Mar 13, 2026
0f10c04
feat: rename generated fields to {column}{Algorithm}{Metric} with ded…
pyramation Mar 13, 2026
f9cd669
fix: update tsvector filter test and server-test snapshot for new nam…
pyramation Mar 13, 2026
cef6a12
feat: add unified graphile-search plugin with adapter pattern
pyramation Mar 13, 2026
74fde11
chore: add jest.config.js for graphile-search with ts-jest
pyramation Mar 13, 2026
a21fe61
fix: update schema snapshot for {column}TrgmSimilarity naming convention
pyramation Mar 13, 2026
6789edd
fix: update SIMILARITY_EMAIL orderBy enums in schema snapshot
pyramation Mar 13, 2026
bda189a
Merge branch 'devin/1773429791-v5-filter-system-complete' into devin/…
pyramation Mar 13, 2026
0088947
ci: add graphile-search to CI test matrix
pyramation Mar 13, 2026
11ca5ba
fix: add --forceExit and testTimeout to graphile-search jest config t…
pyramation Mar 13, 2026
8155fa8
fix: resolve CI failures in graphile-search tests
pyramation Mar 13, 2026
c00370d
chore: update pnpm-lock.yaml for graphile-tsvector devDependency
pyramation Mar 13, 2026
97d9290
feat: rename tsvector filterPrefix to 'tsv', add fullTextSearch compo…
pyramation Mar 13, 2026
b10082e
fix: use correct imports in fullTextSearch disabled test (getConnecti…
pyramation Mar 13, 2026
2e1056b
fix: BM25 adapter falls back to module-level index store, move disabl…
pyramation Mar 13, 2026
bd4103c
debug: add introspection logging to disabled fullTextSearch test
pyramation Mar 14, 2026
9f7dcbc
fix: use introspection to verify fullTextSearch disabled (Grafast ign…
pyramation Mar 14, 2026
dafe915
feat: consolidate 4 search packages into unified graphile-search
pyramation Mar 14, 2026
8fc3314
fix: update test references for unified search consolidation
pyramation Mar 14, 2026
82d92a8
fix: update snapshots for unified search consolidation
pyramation Mar 14, 2026
1056255
fix: add missing TagOrderBy enums to server-test snapshot
pyramation Mar 14, 2026
f87e521
test: add search integration test with SQL fixture for mega queries v…
pyramation Mar 14, 2026
10b4fc6
feat: rename filter argument to where (configurable via connectionFil…
pyramation Mar 14, 2026
c3b4990
fix: update snapshots and test assertions for filter→where argument r…
pyramation Mar 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ jobs:
env: {}
- package: graphile/graphile-test
env: {}
- package: graphile/graphile-search-plugin
env: {}
- package: graphile/graphile-pgvector-plugin
- package: graphile/graphile-connection-filter
env: {}
- package: graphql/server-test
env: {}
Expand Down Expand Up @@ -107,6 +105,10 @@ jobs:
env: {}
- package: packages/postmaster
env: {}
- package: graphile/graphile-search
env: {}
- package: graphile/graphile-settings
env: {}

env:
PGHOST: localhost
Expand Down
7 changes: 5 additions & 2 deletions GRAPHILE.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,13 @@ All Graphile RC dependencies are pinned to **exact versions** (no `^` or `~` pre
- **graphile-settings** -- Core settings/configuration for PostGraphile v5 (most deps, including the transitive peer deps `tamedevil`, `@dataplan/pg`, `@dataplan/json`, `grafserv`)
- **graphile-schema** -- Builds GraphQL SDL from PostgreSQL using PostGraphile v5
- **graphile-query** -- Executes GraphQL queries against PostGraphile v5 schemas
- **graphile-search-plugin** -- Full-text search plugin for PostGraphile v5
- **graphile-tsvector** -- Full-text search plugin for PostGraphile v5 (tsvector columns, `matches` filter, rank scoring)
- **graphile-bm25** -- BM25 ranked full-text search plugin for PostGraphile v5 (pg_textsearch auto-discovery, score fields, orderBy)
- **graphile-trgm** -- pg_trgm fuzzy text matching plugin for PostGraphile v5 (similarTo/wordSimilarTo operators, similarity scoring)
- **graphile-pgvector** -- pgvector codec + auto-discovered vector search plugin for PostGraphile v5
- **graphile-connection-filter** -- v5-native connection filter plugin (scalar, logical, array, relation, computed column filters)
- **graphile-cache** -- LRU cache with PostGraphile v5 integration
- **graphile-test** -- PostGraphile v5 testing utilities
- **graphile-pgvector-plugin** -- pgvector codec + auto-discovered vector search plugin for PostGraphile v5

### `graphql/` packages

Expand Down
6 changes: 3 additions & 3 deletions functions/send-email-link/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const app = createJobApp();

const GetUser = gql`
query GetUser($userId: UUID!) {
users(condition: { id: $userId }, first: 1) {
users(filter: { id: { equalTo: $userId } }, first: 1) {
nodes {
username
displayName
Expand All @@ -26,7 +26,7 @@ const GetUser = gql`

const GetDatabaseInfo = gql`
query GetDatabaseInfo($databaseId: UUID!) {
databases(condition: { id: $databaseId }, first: 1) {
databases(filter: { id: { equalTo: $databaseId } }, first: 1) {
nodes {
sites {
nodes {
Expand All @@ -43,7 +43,7 @@ const GetDatabaseInfo = gql`
theme
}
}
siteModules(condition: { name: "legal_terms_module" }) {
siteModules(filter: { name: { equalTo: "legal_terms_module" } }) {
nodes {
data
}
Expand Down
49 changes: 49 additions & 0 deletions graphile/graphile-connection-filter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# graphile-connection-filter

A PostGraphile v5 native connection filter plugin for the Constructive monorepo.

Adds advanced filtering capabilities to connection and list fields, including:

- Per-table filter types (e.g. `UserFilter`)
- Per-scalar operator types (e.g. `StringFilter`, `IntFilter`)
- Standard operators: `equalTo`, `notEqualTo`, `isNull`, `in`, `notIn`, etc.
- Sort operators: `lessThan`, `greaterThan`, etc.
- Pattern matching: `includes`, `startsWith`, `endsWith`, `like` + case-insensitive variants
- Type-specific operators: JSONB, hstore, inet, array, range
- Logical operators: `and`, `or`, `not`
- Declarative custom operator API: `connectionFilterOperatorFactories` for satellite plugins

## Usage

```typescript
import { ConnectionFilterPreset } from 'graphile-connection-filter';

const preset: GraphileConfig.Preset = {
extends: [
ConnectionFilterPreset(),
],
};
```

## Custom Operators

Satellite plugins declare custom operators via `connectionFilterOperatorFactories` in their preset's schema options. Each factory is a function that receives the `build` object and returns an array of operator registrations:

```typescript
import type { ConnectionFilterOperatorFactory } from 'graphile-connection-filter';

const myOperatorFactory: ConnectionFilterOperatorFactory = (build) => [{
typeNames: 'MyType',
operatorName: 'myOperator',
spec: {
description: 'My custom operator',
resolve: (sqlIdentifier, sqlValue) => build.sql`${sqlIdentifier} OP ${sqlValue}`,
},
}];

const MyPreset: GraphileConfig.Preset = {
schema: {
connectionFilterOperatorFactories: [myOperatorFactory],
},
};
```
Loading
Loading