Skip to content

Commit f1763a3

Browse files
committed
chore: restore postgraphile-plugin-pgvector package and add both packages to CI
1 parent e522509 commit f1763a3

15 files changed

Lines changed: 1185 additions & 0 deletions

File tree

.github/workflows/run-tests.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ jobs:
7777
env: {}
7878
- package: graphile/graphile-pgvector-plugin
7979
env: {}
80+
- package: graphile/postgraphile-plugin-pgvector
81+
env: {}
8082
- package: graphql/server-test
8183
env: {}
8284
- package: graphql/env
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Change Log
2+
3+
All notable changes to this project will be documented in this file.
4+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5+
6+
## [2.2.4](https://github.com/constructive-io/constructive/compare/postgraphile-plugin-pgvector@2.2.3...postgraphile-plugin-pgvector@2.2.4) (2026-02-28)
7+
8+
**Note:** Version bump only for package postgraphile-plugin-pgvector
9+
10+
## [2.2.3](https://github.com/constructive-io/constructive/compare/postgraphile-plugin-pgvector@2.2.2...postgraphile-plugin-pgvector@2.2.3) (2026-02-28)
11+
12+
**Note:** Version bump only for package postgraphile-plugin-pgvector
13+
14+
## [2.2.2](https://github.com/constructive-io/constructive/compare/postgraphile-plugin-pgvector@2.2.1...postgraphile-plugin-pgvector@2.2.2) (2026-02-26)
15+
16+
**Note:** Version bump only for package postgraphile-plugin-pgvector
17+
18+
## [2.2.1](https://github.com/constructive-io/constructive/compare/postgraphile-plugin-pgvector@2.2.0...postgraphile-plugin-pgvector@2.2.1) (2026-02-25)
19+
20+
**Note:** Version bump only for package postgraphile-plugin-pgvector
21+
22+
# [2.2.0](https://github.com/constructive-io/constructive/compare/postgraphile-plugin-pgvector@2.1.2...postgraphile-plugin-pgvector@2.2.0) (2026-02-24)
23+
24+
**Note:** Version bump only for package postgraphile-plugin-pgvector
25+
26+
## [2.1.2](https://github.com/constructive-io/constructive/compare/postgraphile-plugin-pgvector@2.1.1...postgraphile-plugin-pgvector@2.1.2) (2026-02-24)
27+
28+
**Note:** Version bump only for package postgraphile-plugin-pgvector
29+
30+
## [2.1.1](https://github.com/constructive-io/constructive/compare/postgraphile-plugin-pgvector@2.1.0...postgraphile-plugin-pgvector@2.1.1) (2026-02-19)
31+
32+
**Note:** Version bump only for package postgraphile-plugin-pgvector
33+
34+
# [2.1.0](https://github.com/constructive-io/constructive/compare/postgraphile-plugin-pgvector@2.0.1...postgraphile-plugin-pgvector@2.1.0) (2026-02-19)
35+
36+
**Note:** Version bump only for package postgraphile-plugin-pgvector
37+
38+
## [2.0.1](https://github.com/constructive-io/constructive/compare/postgraphile-plugin-pgvector@2.0.0...postgraphile-plugin-pgvector@2.0.1) (2026-02-15)
39+
40+
**Note:** Version bump only for package postgraphile-plugin-pgvector
41+
42+
# 2.0.0 (2026-02-13)
43+
44+
**Note:** Version bump only for package postgraphile-plugin-pgvector
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# postgraphile-plugin-pgvector
2+
3+
PostGraphile v5 plugin for pgvector similarity search, enabling vector-based queries in your GraphQL API.
4+
5+
## Features
6+
7+
- **Vector Similarity Search**: Query your data by vector similarity using pgvector
8+
- **Multiple Distance Metrics**: Support for COSINE, L2 (Euclidean), and IP (Inner Product) metrics
9+
- **Configurable Collections**: Define multiple vector search endpoints for different tables
10+
- **Pagination**: Built-in support for limit and offset parameters
11+
12+
## Installation
13+
14+
```bash
15+
pnpm add postgraphile-plugin-pgvector
16+
```
17+
18+
## Prerequisites
19+
20+
- PostgreSQL with pgvector extension installed
21+
- PostGraphile v5
22+
23+
## Usage
24+
25+
```typescript
26+
import { PgVectorPreset } from 'postgraphile-plugin-pgvector';
27+
28+
const preset = {
29+
extends: [
30+
ConstructivePreset,
31+
PgVectorPreset({
32+
collections: [{
33+
schema: 'public',
34+
table: 'documents',
35+
embeddingColumn: 'embedding',
36+
graphqlFieldName: 'vectorSearchDocument',
37+
}],
38+
defaultMetric: 'COSINE',
39+
maxLimit: 100,
40+
}),
41+
],
42+
};
43+
```
44+
45+
## GraphQL Query Example
46+
47+
```graphql
48+
query {
49+
vectorSearchDocument(query: [0.1, 0.2, 0.3], limit: 10, metric: COSINE) {
50+
id
51+
title
52+
distance
53+
}
54+
}
55+
```
56+
57+
## License
58+
59+
MIT
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/** @type {import('ts-jest').JestConfigWithTsJest} */
2+
module.exports = {
3+
preset: 'ts-jest',
4+
testEnvironment: 'node',
5+
transform: {
6+
'^.+\\.tsx?$': [
7+
'ts-jest',
8+
{
9+
babelConfig: false,
10+
tsconfig: 'tsconfig.json'
11+
}
12+
]
13+
},
14+
transformIgnorePatterns: [`/node_modules/*`],
15+
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$',
16+
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
17+
modulePathIgnorePatterns: ['dist/*']
18+
};
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"name": "postgraphile-plugin-pgvector",
3+
"version": "2.2.4",
4+
"author": "Constructive <developers@constructive.io>",
5+
"description": "PostGraphile v5 plugin for pgvector similarity search",
6+
"main": "index.js",
7+
"module": "esm/index.js",
8+
"types": "index.d.ts",
9+
"homepage": "https://github.com/constructive-io/constructive",
10+
"license": "MIT",
11+
"publishConfig": {
12+
"access": "public",
13+
"directory": "dist"
14+
},
15+
"repository": {
16+
"type": "git",
17+
"url": "https://github.com/constructive-io/constructive"
18+
},
19+
"bugs": {
20+
"url": "https://github.com/constructive-io/constructive/issues"
21+
},
22+
"scripts": {
23+
"clean": "makage clean",
24+
"prepack": "npm run build",
25+
"build": "makage build",
26+
"build:dev": "makage build --dev",
27+
"lint": "eslint . --fix",
28+
"test": "jest",
29+
"test:watch": "jest --watch"
30+
},
31+
"devDependencies": {
32+
"@types/node": "^22.19.1",
33+
"@types/pg": "^8.16.0",
34+
"graphile-settings": "workspace:^",
35+
"graphile-test": "workspace:^",
36+
"makage": "^0.1.10",
37+
"pg": "^8.17.1",
38+
"pgsql-test": "workspace:^"
39+
},
40+
"dependencies": {
41+
"grafast": "1.0.0-rc.7",
42+
"graphile-build": "5.0.0-rc.4",
43+
"graphile-build-pg": "5.0.0-rc.5",
44+
"graphile-config": "1.0.0-rc.5",
45+
"pg-sql2": "5.0.0-rc.4"
46+
},
47+
"peerDependencies": {
48+
"graphql": "^16.9.0",
49+
"postgraphile": "5.0.0-rc.7"
50+
},
51+
"keywords": [
52+
"postgraphile",
53+
"graphql",
54+
"postgresql",
55+
"pgvector",
56+
"vector",
57+
"similarity",
58+
"embeddings",
59+
"ai",
60+
"constructive"
61+
]
62+
}

0 commit comments

Comments
 (0)