graphile-plugin-connection-filter-postgis 1.0.0-alpha.7 โ†’ 1.0.2

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 (2) hide show
  1. package/README.md +36 -10
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -16,16 +16,44 @@
16
16
  </a>
17
17
  </p>
18
18
 
19
- This plugin exposes additional PostGIS-related fields on the `filter` argument of Connections.
19
+ **`graphile-plugin-connection-filter-postgis`** exposes PostGIS-aware operators on the `filter` argument for PostGraphile connections.
20
20
 
21
- ## Usage
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.0`
26
38
  - `graphile-plugin-connection-filter@^2.0.0`
27
39
 
28
- ## Operators
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
- To establish a test environment, create an empty PostgreSQL database and set a `TEST_DATABASE_URL` environment variable with your database connection string.
92
+ ## ๐Ÿงช Testing
65
93
 
66
- ```bash
67
- createdb graphile_test
68
- export TEST_DATABASE_URL=postgres://localhost:5432/graphile_test
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.0-alpha.7",
3
+ "version": "1.0.2",
4
4
  "description": "PostGIS filtering options in PostGraphile",
5
5
  "author": "Matt Bretl",
6
6
  "homepage": "https://github.com/launchql/launchql",
@@ -43,7 +43,7 @@
43
43
  "@graphile/postgis": "^0.1.0",
44
44
  "graphile-build": "^4.14.1",
45
45
  "graphile-build-pg": "^4.14.1",
46
- "graphile-plugin-connection-filter": "^2.3.2"
46
+ "graphile-plugin-connection-filter": "^2.3.3"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@graphile/postgis": "^0.1.0",
@@ -53,12 +53,12 @@
53
53
  "devDependencies": {
54
54
  "@types/pg": "^8.15.6",
55
55
  "graphile-plugin-connection-filter": "workspace:^",
56
- "graphile-test": "^2.8.10",
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.13",
60
+ "pgsql-test": "^2.14.14",
61
61
  "postgraphile": "^4.14.1"
62
62
  },
63
- "gitHead": "4e1ff9771c2b07808a9830281abc24d12c689187"
63
+ "gitHead": "00c90828cab8d3e306ebb2bc6053aab4aa9ae807"
64
64
  }