graphile-search-plugin 0.1.13 โ 0.1.15
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.
- package/README.md +19 -11
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -8,19 +8,29 @@
|
|
|
8
8
|
<a href="https://github.com/launchql/launchql/actions/workflows/run-tests.yaml">
|
|
9
9
|
<img height="20" src="https://github.com/launchql/launchql/actions/workflows/run-tests.yaml/badge.svg" />
|
|
10
10
|
</a>
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
<a href="https://github.com/launchql/launchql/blob/main/LICENSE">
|
|
12
|
+
<img height="20" src="https://img.shields.io/badge/license-MIT-blue.svg"/>
|
|
13
|
+
</a>
|
|
14
|
+
<a href="https://www.npmjs.com/package/graphile-search-plugin">
|
|
15
|
+
<img height="20" src="https://img.shields.io/github/package-json/v/launchql/launchql?filename=graphile%2Fgraphile-search-plugin%2Fpackage.json"/>
|
|
16
|
+
</a>
|
|
13
17
|
</p>
|
|
14
18
|
|
|
15
|
-
|
|
19
|
+
**`graphile-search-plugin`** enables `ts_rank` ordering and auto-generated full-text search helpers for all `tsvector` fields in PostGraphile schemas.
|
|
16
20
|
|
|
17
|
-
##
|
|
21
|
+
## ๐ Installation
|
|
18
22
|
|
|
19
23
|
```sh
|
|
20
24
|
npm install graphile-search-plugin
|
|
21
25
|
```
|
|
22
26
|
|
|
23
|
-
##
|
|
27
|
+
## โจ Features
|
|
28
|
+
|
|
29
|
+
- Adds full-text search helpers for `tsvector` columns
|
|
30
|
+
- Enables ordering via `ts_rank` on generated search fields
|
|
31
|
+
- Works with PostGraphile append plugin pipeline
|
|
32
|
+
|
|
33
|
+
## ๐ฆ Usage
|
|
24
34
|
|
|
25
35
|
1. Append the new plugins!
|
|
26
36
|
2. Query `search<YourTsvectorColumn>` in the `conditions` field
|
|
@@ -39,17 +49,15 @@ app.use(
|
|
|
39
49
|
);
|
|
40
50
|
```
|
|
41
51
|
|
|
42
|
-
## Examples
|
|
52
|
+
## ๐งช Examples
|
|
43
53
|
|
|
44
54
|
Look in the tests ;)
|
|
45
55
|
|
|
46
|
-
## Testing
|
|
56
|
+
## ๐งช Testing
|
|
47
57
|
|
|
48
58
|
```sh
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
psql test_database < sql/test.sql
|
|
52
|
-
yarn test
|
|
59
|
+
# requires a local Postgres available (defaults to postgres/password@localhost:5432)
|
|
60
|
+
pnpm --filter graphile-search-plugin test
|
|
53
61
|
```
|
|
54
62
|
|
|
55
63
|
---
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphile-search-plugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
4
4
|
"description": "generate search conditions for your tsvector columns",
|
|
5
5
|
"author": "Dan Lynch <pyramation@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/launchql/launchql",
|
|
@@ -38,16 +38,16 @@
|
|
|
38
38
|
"url": "https://github.com/launchql/launchql/issues"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"graphile-plugin-connection-filter": "^2.3.
|
|
42
|
-
"graphile-plugin-fulltext-filter": "^2.0.
|
|
43
|
-
"graphile-simple-inflector": "^0.1.
|
|
44
|
-
"graphile-test": "^2.8.
|
|
41
|
+
"graphile-plugin-connection-filter": "^2.3.3",
|
|
42
|
+
"graphile-plugin-fulltext-filter": "^2.0.4",
|
|
43
|
+
"graphile-simple-inflector": "^0.1.10",
|
|
44
|
+
"graphile-test": "^2.8.11",
|
|
45
45
|
"makage": "^0.1.8",
|
|
46
|
-
"pgsql-test": "^2.14.
|
|
46
|
+
"pgsql-test": "^2.14.14"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"graphile-build": "^4.14.1",
|
|
50
50
|
"graphql-tag": "2.12.6"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "00c90828cab8d3e306ebb2bc6053aab4aa9ae807"
|
|
53
53
|
}
|