graphile-plugin-fulltext-filter 2.0.3 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +55 -48
  3. package/package.json +8 -8
package/LICENSE CHANGED
@@ -1,7 +1,7 @@
1
1
  The MIT License (MIT)
2
2
 
3
3
  Copyright (c) 2025 Dan Lynch <pyramation@gmail.com>
4
- Copyright (c) 2025 Hyperweb <developers@hyperweb.io>
4
+ Copyright (c) 2025 Constructive <developers@constructive.io>
5
5
  Copyright (c) 2020-present, Interweb, Inc.
6
6
 
7
7
  Permission is hereby granted, free of charge, to any person obtaining a copy
package/README.md CHANGED
@@ -1,14 +1,14 @@
1
1
  # graphile-plugin-fulltext-filter
2
2
 
3
3
  <p align="center" width="100%">
4
- <img height="250" src="https://raw.githubusercontent.com/launchql/launchql/refs/heads/main/assets/outline-logo.svg" />
4
+ <img height="250" src="https://raw.githubusercontent.com/constructive-io/constructive/refs/heads/main/assets/outline-logo.svg" />
5
5
  </p>
6
6
 
7
7
  <p align="center" width="100%">
8
- <a href="https://github.com/launchql/launchql/actions/workflows/run-tests.yaml">
9
- <img height="20" src="https://github.com/launchql/launchql/actions/workflows/run-tests.yaml/badge.svg" />
8
+ <a href="https://github.com/constructive-io/constructive/actions/workflows/run-tests.yaml">
9
+ <img height="20" src="https://github.com/constructive-io/constructive/actions/workflows/run-tests.yaml/badge.svg" />
10
10
  </a>
11
- <a href="https://github.com/launchql/launchql/blob/main/LICENSE">
11
+ <a href="https://github.com/constructive-io/constructive/blob/main/LICENSE">
12
12
  <img height="20" src="https://img.shields.io/badge/license-MIT-blue.svg"/>
13
13
  </a>
14
14
  <a href="https://www.npmjs.com/package/graphile-plugin-fulltext-filter">
@@ -16,15 +16,23 @@
16
16
  </a>
17
17
  </p>
18
18
 
19
- Full text searching on `tsvector` fields for use with `graphile-plugin-connection-filter`. This plugin implements a full text search operator for `tsvector` columns in PostGraphile v4.
19
+ **`graphile-plugin-fulltext-filter`** adds full-text search operators for `tsvector` fields to `graphile-plugin-connection-filter` in PostGraphile v4.
20
20
 
21
- ## Install
21
+ ## 🚀 Installation
22
22
 
23
23
  ```sh
24
24
  pnpm add graphile-plugin-fulltext-filter
25
25
  ```
26
26
 
27
- ## Usage
27
+ ## ✨ Features
28
+
29
+ - Adds a `matches` operator for `tsvector` columns in PostGraphile v4
30
+ - Works alongside `graphile-plugin-connection-filter`
31
+ - Generates rank fields for ordering results (`fullTextRank`)
32
+ - CLI and library-friendly setup
33
+ - Uses `pg-tsquery` to safely parse user input
34
+
35
+ ## 📦 Usage
28
36
 
29
37
  ### CLI
30
38
 
@@ -56,7 +64,7 @@ app.use(
56
64
  app.listen(5000);
57
65
  ```
58
66
 
59
- ## Performance
67
+ ## Performance
60
68
 
61
69
  All `tsvector` columns that aren't `@omit`'d should have indexes on them:
62
70
 
@@ -65,19 +73,19 @@ ALTER TABLE posts ADD COLUMN full_text tsvector;
65
73
  CREATE INDEX full_text_idx ON posts USING gin(full_text);
66
74
  ```
67
75
 
68
- ## Operators
76
+ ## 🔎 Operators
69
77
 
70
78
  This plugin adds the `matches` filter operator to the filter plugin, accepting a GraphQL String input and using the `@@` operator to perform full-text searches on `tsvector` columns.
71
79
 
72
80
  This plugin uses [pg-tsquery](https://github.com/caub/pg-tsquery) to parse the user input to prevent Postgres throwing on bad user input unnecessarily.
73
81
 
74
- ## Fields
82
+ ## 🧭 Fields
75
83
 
76
84
  For each `tsvector` column, a rank column will be automatically added to the GraphQL type for the table by appending `Rank` to the end of the column's name. For example, a column `full_text` will appear as `fullText` in the GraphQL type, and a second column, `fullTextRank` will be added to the type as a `Float`.
77
85
 
78
86
  This rank field can be used for ordering and is automatically added to the orderBy enum for the table.
79
87
 
80
- ## Examples
88
+ ## 🧪 Examples
81
89
 
82
90
  ```graphql
83
91
  query {
@@ -93,83 +101,82 @@ query {
93
101
  }
94
102
  ```
95
103
 
96
- ## Testing
104
+ ## 🧪 Testing
97
105
 
98
106
  ```sh
99
- pnpm test
107
+ # requires a local Postgres available (defaults to postgres/password@localhost:5432)
108
+ pnpm --filter graphile-plugin-fulltext-filter test
100
109
  ```
101
110
 
102
- Tests expect a running PostgreSQL instance. See test configuration for database connection details.
103
-
104
111
  ---
105
112
 
106
113
  ## Education and Tutorials
107
114
 
108
- 1. 🚀 [Quickstart: Getting Up and Running](https://launchql.com/learn/quickstart)
115
+ 1. 🚀 [Quickstart: Getting Up and Running](https://constructive.io/learn/quickstart)
109
116
  Get started with modular databases in minutes. Install prerequisites and deploy your first module.
110
117
 
111
- 2. 📦 [Modular PostgreSQL Development with Database Packages](https://launchql.com/learn/modular-postgres)
118
+ 2. 📦 [Modular PostgreSQL Development with Database Packages](https://constructive.io/learn/modular-postgres)
112
119
  Learn to organize PostgreSQL projects with pgpm workspaces and reusable database modules.
113
120
 
114
- 3. ✏️ [Authoring Database Changes](https://launchql.com/learn/authoring-database-changes)
121
+ 3. ✏️ [Authoring Database Changes](https://constructive.io/learn/authoring-database-changes)
115
122
  Master the workflow for adding, organizing, and managing database changes with pgpm.
116
123
 
117
- 4. 🧪 [End-to-End PostgreSQL Testing with TypeScript](https://launchql.com/learn/e2e-postgres-testing)
124
+ 4. 🧪 [End-to-End PostgreSQL Testing with TypeScript](https://constructive.io/learn/e2e-postgres-testing)
118
125
  Master end-to-end PostgreSQL testing with ephemeral databases, RLS testing, and CI/CD automation.
119
126
 
120
- 5. ⚡ [Supabase Testing](https://launchql.com/learn/supabase)
127
+ 5. ⚡ [Supabase Testing](https://constructive.io/learn/supabase)
121
128
  Use TypeScript-first tools to test Supabase projects with realistic RLS, policies, and auth contexts.
122
129
 
123
- 6. 💧 [Drizzle ORM Testing](https://launchql.com/learn/drizzle-testing)
130
+ 6. 💧 [Drizzle ORM Testing](https://constructive.io/learn/drizzle-testing)
124
131
  Run full-stack tests with Drizzle ORM, including database setup, teardown, and RLS enforcement.
125
132
 
126
- 7. 🔧 [Troubleshooting](https://launchql.com/learn/troubleshooting)
133
+ 7. 🔧 [Troubleshooting](https://constructive.io/learn/troubleshooting)
127
134
  Common issues and solutions for pgpm, PostgreSQL, and testing.
128
135
 
129
- ## Related LaunchQL Tooling
136
+ ## Related Constructive Tooling
130
137
 
131
138
  ### 🧪 Testing
132
139
 
133
- * [launchql/pgsql-test](https://github.com/launchql/launchql/tree/main/packages/pgsql-test): **📊 Isolated testing environments** with per-test transaction rollbacks—ideal for integration tests, complex migrations, and RLS simulation.
134
- * [launchql/supabase-test](https://github.com/launchql/launchql/tree/main/packages/supabase-test): **🧪 Supabase-native test harness** preconfigured for the local Supabase stack—per-test rollbacks, JWT/role context helpers, and CI/GitHub Actions ready.
135
- * [launchql/graphile-test](https://github.com/launchql/launchql/tree/main/packages/graphile-test): **🔐 Authentication mocking** for Graphile-focused test helpers and emulating row-level security contexts.
136
- * [launchql/pg-query-context](https://github.com/launchql/launchql/tree/main/packages/pg-query-context): **🔒 Session context injection** to add session-local context (e.g., `SET LOCAL`) into queries—ideal for setting `role`, `jwt.claims`, and other session settings.
140
+ * [pgsql-test](https://github.com/constructive-io/constructive/tree/main/packages/pgsql-test): **📊 Isolated testing environments** with per-test transaction rollbacks—ideal for integration tests, complex migrations, and RLS simulation.
141
+ * [supabase-test](https://github.com/constructive-io/constructive/tree/main/packages/supabase-test): **🧪 Supabase-native test harness** preconfigured for the local Supabase stack—per-test rollbacks, JWT/role context helpers, and CI/GitHub Actions ready.
142
+ * [graphile-test](https://github.com/constructive-io/constructive/tree/main/packages/graphile-test): **🔐 Authentication mocking** for Graphile-focused test helpers and emulating row-level security contexts.
143
+ * [pg-query-context](https://github.com/constructive-io/constructive/tree/main/packages/pg-query-context): **🔒 Session context injection** to add session-local context (e.g., `SET LOCAL`) into queries—ideal for setting `role`, `jwt.claims`, and other session settings.
137
144
 
138
145
  ### 🧠 Parsing & AST
139
146
 
140
- * [launchql/pgsql-parser](https://github.com/launchql/pgsql-parser): **🔄 SQL conversion engine** that interprets and converts PostgreSQL syntax.
141
- * [launchql/libpg-query-node](https://github.com/launchql/libpg-query-node): **🌉 Node.js bindings** for `libpg_query`, converting SQL into parse trees.
142
- * [launchql/pg-proto-parser](https://github.com/launchql/pg-proto-parser): **📦 Protobuf parser** for parsing PostgreSQL Protocol Buffers definitions to generate TypeScript interfaces, utility functions, and JSON mappings for enums.
143
- * [@pgsql/enums](https://github.com/launchql/pgsql-parser/tree/main/packages/enums): **🏷️ TypeScript enums** for PostgreSQL AST for safe and ergonomic parsing logic.
144
- * [@pgsql/types](https://github.com/launchql/pgsql-parser/tree/main/packages/types): **📝 Type definitions** for PostgreSQL AST nodes in TypeScript.
145
- * [@pgsql/utils](https://github.com/launchql/pgsql-parser/tree/main/packages/utils): **🛠️ AST utilities** for constructing and transforming PostgreSQL syntax trees.
146
- * [launchql/pg-ast](https://github.com/launchql/launchql/tree/main/packages/pg-ast): **🔍 Low-level AST tools** and transformations for Postgres query structures.
147
+ * [pgsql-parser](https://www.npmjs.com/package/pgsql-parser): **🔄 SQL conversion engine** that interprets and converts PostgreSQL syntax.
148
+ * [libpg-query-node](https://www.npmjs.com/package/libpg-query): **🌉 Node.js bindings** for `libpg_query`, converting SQL into parse trees.
149
+ * [pg-proto-parser](https://www.npmjs.com/package/pg-proto-parser): **📦 Protobuf parser** for parsing PostgreSQL Protocol Buffers definitions to generate TypeScript interfaces, utility functions, and JSON mappings for enums.
150
+ * [@pgsql/enums](https://www.npmjs.com/package/@pgsql/enums): **🏷️ TypeScript enums** for PostgreSQL AST for safe and ergonomic parsing logic.
151
+ * [@pgsql/types](https://www.npmjs.com/package/@pgsql/types): **📝 Type definitions** for PostgreSQL AST nodes in TypeScript.
152
+ * [@pgsql/utils](https://www.npmjs.com/package/@pgsql/utils): **🛠️ AST utilities** for constructing and transforming PostgreSQL syntax trees.
153
+ * [pg-ast](https://www.npmjs.com/package/pg-ast): **🔍 Low-level AST tools** and transformations for Postgres query structures.
147
154
 
148
155
  ### 🚀 API & Dev Tools
149
156
 
150
- * [launchql/server](https://github.com/launchql/launchql/tree/main/packages/server): **⚡ Express-based API server** powered by PostGraphile to expose a secure, scalable GraphQL API over your Postgres database.
151
- * [launchql/explorer](https://github.com/launchql/launchql/tree/main/packages/explorer): **🔎 Visual API explorer** with GraphiQL for browsing across all databases and schemas—useful for debugging, documentation, and API prototyping.
157
+ * [launchql/server](https://github.com/constructive-io/constructive/tree/main/packages/server): **⚡ Express-based API server** powered by PostGraphile to expose a secure, scalable GraphQL API over your Postgres database.
158
+ * [launchql/explorer](https://github.com/constructive-io/constructive/tree/main/packages/explorer): **🔎 Visual API explorer** with GraphiQL for browsing across all databases and schemas—useful for debugging, documentation, and API prototyping.
152
159
 
153
160
  ### 🔁 Streaming & Uploads
154
161
 
155
- * [launchql/s3-streamer](https://github.com/launchql/launchql/tree/main/packages/s3-streamer): **📤 Direct S3 streaming** for large files with support for metadata injection and content validation.
156
- * [launchql/etag-hash](https://github.com/launchql/launchql/tree/main/packages/etag-hash): **🏷️ S3-compatible ETags** created by streaming and hashing file uploads in chunks.
157
- * [launchql/etag-stream](https://github.com/launchql/launchql/tree/main/packages/etag-stream): **🔄 ETag computation** via Node stream transformer during upload or transfer.
158
- * [launchql/uuid-hash](https://github.com/launchql/launchql/tree/main/packages/uuid-hash): **🆔 Deterministic UUIDs** generated from hashed content, great for deduplication and asset referencing.
159
- * [launchql/uuid-stream](https://github.com/launchql/launchql/tree/main/packages/uuid-stream): **🌊 Streaming UUID generation** based on piped file content—ideal for upload pipelines.
160
- * [launchql/upload-names](https://github.com/launchql/launchql/tree/main/packages/upload-names): **📂 Collision-resistant filenames** utility for structured and unique file names for uploads.
162
+ * [launchql/s3-streamer](https://github.com/constructive-io/constructive/tree/main/packages/s3-streamer): **📤 Direct S3 streaming** for large files with support for metadata injection and content validation.
163
+ * [launchql/etag-hash](https://github.com/constructive-io/constructive/tree/main/packages/etag-hash): **🏷️ S3-compatible ETags** created by streaming and hashing file uploads in chunks.
164
+ * [launchql/etag-stream](https://github.com/constructive-io/constructive/tree/main/packages/etag-stream): **🔄 ETag computation** via Node stream transformer during upload or transfer.
165
+ * [launchql/uuid-hash](https://github.com/constructive-io/constructive/tree/main/packages/uuid-hash): **🆔 Deterministic UUIDs** generated from hashed content, great for deduplication and asset referencing.
166
+ * [launchql/uuid-stream](https://github.com/constructive-io/constructive/tree/main/packages/uuid-stream): **🌊 Streaming UUID generation** based on piped file content—ideal for upload pipelines.
167
+ * [launchql/upload-names](https://github.com/constructive-io/constructive/tree/main/packages/upload-names): **📂 Collision-resistant filenames** utility for structured and unique file names for uploads.
161
168
 
162
169
  ### 🧰 CLI & Codegen
163
170
 
164
- * [pgpm](https://github.com/launchql/launchql/tree/main/packages/pgpm): **🖥️ PostgreSQL Package Manager** for modular Postgres development. Works with database workspaces, scaffolding, migrations, seeding, and installing database packages.
165
- * [@launchql/cli](https://github.com/launchql/launchql/tree/main/packages/cli): **🖥️ Command-line toolkit** for managing LaunchQL projects—supports database scaffolding, migrations, seeding, code generation, and automation.
166
- * [launchql/launchql-gen](https://github.com/launchql/launchql/tree/main/packages/launchql-gen): **✨ Auto-generated GraphQL** mutations and queries dynamically built from introspected schema data.
167
- * [@launchql/query-builder](https://github.com/launchql/launchql/tree/main/packages/query-builder): **🏗️ SQL constructor** providing a robust TypeScript-based query builder for dynamic generation of `SELECT`, `INSERT`, `UPDATE`, `DELETE`, and stored procedure calls—supports advanced SQL features like `JOIN`, `GROUP BY`, and schema-qualified queries.
168
- * [@launchql/query](https://github.com/launchql/launchql/tree/main/packages/query): **🧩 Fluent GraphQL builder** for PostGraphile schemas. ⚡ Schema-aware via introspection, 🧩 composable and ergonomic for building deeply nested queries.
171
+ * [pgpm](https://github.com/constructive-io/constructive/tree/main/packages/pgpm): **🖥️ PostgreSQL Package Manager** for modular Postgres development. Works with database workspaces, scaffolding, migrations, seeding, and installing database packages.
172
+ * [@launchql/cli](https://github.com/constructive-io/constructive/tree/main/packages/cli): **🖥️ Command-line toolkit** for managing LaunchQL projects—supports database scaffolding, migrations, seeding, code generation, and automation.
173
+ * [launchql/launchql-gen](https://github.com/constructive-io/constructive/tree/main/packages/launchql-gen): **✨ Auto-generated GraphQL** mutations and queries dynamically built from introspected schema data.
174
+ * [@launchql/query-builder](https://github.com/constructive-io/constructive/tree/main/packages/query-builder): **🏗️ SQL constructor** providing a robust TypeScript-based query builder for dynamic generation of `SELECT`, `INSERT`, `UPDATE`, `DELETE`, and stored procedure calls—supports advanced SQL features like `JOIN`, `GROUP BY`, and schema-qualified queries.
175
+ * [@launchql/query](https://github.com/constructive-io/constructive/tree/main/packages/query): **🧩 Fluent GraphQL builder** for PostGraphile schemas. ⚡ Schema-aware via introspection, 🧩 composable and ergonomic for building deeply nested queries.
169
176
 
170
177
  ## Credits
171
178
 
172
- 🛠 Built by LaunchQL — if you like our tools, please checkout and contribute to [our github ⚛️](https://github.com/launchql)
179
+ 🛠 Built by Constructive — if you like our tools, please checkout and contribute to [our github ⚛️](https://github.com/constructive-io)
173
180
 
174
181
 
175
182
  ## Disclaimer
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "graphile-plugin-fulltext-filter",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
4
4
  "description": "Full text searching on tsvector fields for use with graphile-plugin-connection-filter",
5
5
  "main": "index.js",
6
6
  "module": "esm/index.js",
7
7
  "types": "index.d.ts",
8
8
  "author": "Mark Lipscombe",
9
- "homepage": "https://github.com/launchql/launchql",
9
+ "homepage": "https://github.com/constructive-io/constructive",
10
10
  "license": "MIT",
11
11
  "scripts": {
12
12
  "clean": "makage clean",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "repository": {
26
26
  "type": "git",
27
- "url": "https://github.com/launchql/launchql"
27
+ "url": "https://github.com/constructive-io/constructive"
28
28
  },
29
29
  "keywords": [
30
30
  "postgraphile",
@@ -37,12 +37,12 @@
37
37
  "tsvector"
38
38
  ],
39
39
  "bugs": {
40
- "url": "https://github.com/launchql/launchql/issues"
40
+ "url": "https://github.com/constructive-io/constructive/issues"
41
41
  },
42
42
  "dependencies": {
43
43
  "graphile-build": "^4.14.1",
44
44
  "graphile-build-pg": "^4.14.1",
45
- "graphile-plugin-connection-filter": "^2.3.2",
45
+ "graphile-plugin-connection-filter": "^2.3.4",
46
46
  "pg-tsquery": "^8.1.0"
47
47
  },
48
48
  "peerDependencies": {
@@ -51,10 +51,10 @@
51
51
  },
52
52
  "devDependencies": {
53
53
  "graphile-plugin-connection-filter": "workspace:^",
54
- "graphile-test": "^2.8.10",
54
+ "graphile-test": "^2.8.12",
55
55
  "graphql": "15.10.1",
56
56
  "makage": "^0.1.8",
57
- "pgsql-test": "^2.14.13"
57
+ "pgsql-test": "^2.14.15"
58
58
  },
59
- "gitHead": "4e1ff9771c2b07808a9830281abc24d12c689187"
59
+ "gitHead": "5a0d7c7502624bd42a214f983fd7ab957e1fb3e3"
60
60
  }