Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 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
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
2 changes: 2 additions & 0 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ jobs:
env: {}
- package: graphile/graphile-pgvector-plugin
env: {}
- package: graphile/graphile-connection-filter
env: {}
- package: graphql/server-test
env: {}
- package: graphql/env
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
40 changes: 40 additions & 0 deletions graphile/graphile-connection-filter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 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`
- Custom operator API: `addConnectionFilterOperator` for satellite plugins

## Usage

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

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

## Custom Operators

Satellite plugins can register custom operators during the `init` hook:

```typescript
const addConnectionFilterOperator = (build as any).addConnectionFilterOperator;
if (typeof addConnectionFilterOperator === 'function') {
addConnectionFilterOperator('MyType', 'myOperator', {
description: 'My custom operator',
resolve: (sqlIdentifier, sqlValue) => sql`${sqlIdentifier} OP ${sqlValue}`,
});
}
```
Loading
Loading