1.0.0-alpha.6 • Published 4 years ago

postgraphile-plugin-connection-filter-postgis v1.0.0-alpha.6

Weekly downloads
211
License
MIT
Repository
github
Last release
4 years ago

Package on npm CircleCI

postgraphile-plugin-connection-filter-postgis

This plugin exposes additional PostGIS-related fields on the filter argument of Connections.

Usage

Requires postgraphile@^4.5.0 and the following plugins appended prior to this plugin:

  • @graphile/postgis@0.1.0
  • postgraphile-plugin-connection-filter@^2.0.0

Operators

PostGIS functionTypesGraphQL field name
ST_3DIntersectsgeometryintersects3D
ST_Containsgeometrycontains
ST_ContainsProperlygeometrycontainsProperly
ST_CoveredBygeometry, geographycoveredBy
ST_Coversgeometry, geographycovers
ST_Crossesgeometrycrosses
ST_Disjointgeometrydisjoint
ST_Equalsgeometryequals
ST_Intersectsgeometry, geographyintersects
ST_OrderingEqualsgeometryorderingEquals
ST_Overlapsgeometryoverlaps
ST_Touchesgeometrytouches
ST_Withingeometrywithin
PostGIS operatorTypesGraphQL field name
=geometry, geographyexactlyEquals
&&geometry, geographybboxIntersects2D
&&&geometrybboxIntersectsND
&<geometrybboxOverlapsOrLeftOf
&<|geometrybboxOverlapsOrBelow
&>geometrybboxOverlapsOrRightOf
|&>geometrybboxOverlapsOrAbove
<<geometrybboxLeftOf
<<|geometrybboxBelow
>>geometrybboxRightOf
|>>geometrybboxAbove
~geometrybboxContains
~=geometrybboxEquals

Development

To establish a test environment, create an empty PostgreSQL database and set a TEST_DATABASE_URL environment variable with your database connection string.

createdb graphile_test
export TEST_DATABASE_URL=postgres://localhost:5432/graphile_test
yarn
yarn test