Home

Awesome

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:

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