graphile-plugin-connection-filter-postgis 1.0.1 โ 1.0.3
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 +37 -11
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -16,16 +16,44 @@
|
|
|
16
16
|
</a>
|
|
17
17
|
</p>
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
**`graphile-plugin-connection-filter-postgis`** exposes PostGIS-aware operators on the `filter` argument for PostGraphile connections.
|
|
20
20
|
|
|
21
|
-
##
|
|
21
|
+
## ๐ Installation
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install graphile-plugin-connection-filter-postgis
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## โจ Features
|
|
28
|
+
|
|
29
|
+
- Adds PostGIS functions and operators to `graphile-plugin-connection-filter`
|
|
30
|
+
- Supports both `geometry` and `geography` columns
|
|
31
|
+
- Works with PostGraphile v4 filter inputs
|
|
32
|
+
|
|
33
|
+
## ๐ฆ Usage
|
|
22
34
|
|
|
23
35
|
Requires `postgraphile@^4.5.0` and the following plugins appended prior to this plugin:
|
|
24
36
|
|
|
25
|
-
-
|
|
37
|
+
- `graphile-postgis@^0.1.3`
|
|
26
38
|
- `graphile-plugin-connection-filter@^2.0.0`
|
|
27
39
|
|
|
28
|
-
|
|
40
|
+
```ts
|
|
41
|
+
import PostGISFilterPlugin from 'graphile-plugin-connection-filter-postgis';
|
|
42
|
+
import PostGISPlugin from 'graphile-postgis';
|
|
43
|
+
import ConnectionFilterPlugin from 'graphile-plugin-connection-filter';
|
|
44
|
+
|
|
45
|
+
app.use(
|
|
46
|
+
postgraphile(pgConfig, schemas, {
|
|
47
|
+
appendPlugins: [
|
|
48
|
+
PostGISPlugin,
|
|
49
|
+
ConnectionFilterPlugin,
|
|
50
|
+
PostGISFilterPlugin
|
|
51
|
+
]
|
|
52
|
+
})
|
|
53
|
+
);
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## ๐ Operators
|
|
29
57
|
|
|
30
58
|
| PostGIS function | Types | GraphQL field name |
|
|
31
59
|
| --- | --- | --- |
|
|
@@ -59,15 +87,13 @@ Requires `postgraphile@^4.5.0` and the following plugins appended prior to this
|
|
|
59
87
|
| ~ | geometry | bboxContains |
|
|
60
88
|
| ~= | geometry | bboxEquals |
|
|
61
89
|
|
|
62
|
-
## Development
|
|
90
|
+
## ๐งโ๐ป Development
|
|
63
91
|
|
|
64
|
-
|
|
92
|
+
## ๐งช Testing
|
|
65
93
|
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
yarn
|
|
70
|
-
yarn test
|
|
94
|
+
```sh
|
|
95
|
+
# requires a local Postgres with PostGIS available (defaults to postgres/password@localhost:5432)
|
|
96
|
+
pnpm --filter graphile-plugin-connection-filter-postgis test
|
|
71
97
|
```
|
|
72
98
|
|
|
73
99
|
---
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphile-plugin-connection-filter-postgis",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "PostGIS filtering options in PostGraphile",
|
|
5
5
|
"author": "Matt Bretl",
|
|
6
6
|
"homepage": "https://github.com/launchql/launchql",
|
|
@@ -40,25 +40,25 @@
|
|
|
40
40
|
"launchql"
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@graphile/postgis": "^0.1.0",
|
|
44
43
|
"graphile-build": "^4.14.1",
|
|
45
44
|
"graphile-build-pg": "^4.14.1",
|
|
46
|
-
"graphile-plugin-connection-filter": "^2.3.
|
|
45
|
+
"graphile-plugin-connection-filter": "^2.3.3",
|
|
46
|
+
"graphile-postgis": "^0.1.3"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@graphile/postgis": "^0.1.0",
|
|
50
49
|
"graphile-plugin-connection-filter": "workspace:^",
|
|
50
|
+
"graphile-postgis": "workspace:^",
|
|
51
51
|
"postgraphile": "^4.14.1"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/pg": "^8.15.6",
|
|
55
55
|
"graphile-plugin-connection-filter": "workspace:^",
|
|
56
|
-
"graphile-test": "^2.8.
|
|
56
|
+
"graphile-test": "^2.8.11",
|
|
57
57
|
"graphql": "15.10.1",
|
|
58
58
|
"makage": "^0.1.6",
|
|
59
59
|
"pg": "^8.16.0",
|
|
60
|
-
"pgsql-test": "^2.14.
|
|
60
|
+
"pgsql-test": "^2.14.14",
|
|
61
61
|
"postgraphile": "^4.14.1"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "ea3f6b8d86ba521ee629411efb4cf4133cc6e302"
|
|
64
64
|
}
|