docs(graphile-postgis): feature-led README with TOC and ORM examples per capability#1003
Merged
pyramation merged 2 commits intomainfrom Apr 18, 2026
Merged
docs(graphile-postgis): feature-led README with TOC and ORM examples per capability#1003pyramation merged 2 commits intomainfrom
pyramation merged 2 commits intomainfrom
Conversation
…relations as its own feature
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
…pability; spatial relations as one feature among many
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The graphile-postgis README had drifted: its top-level "The problem"
section was rewritten to describe only the spatial-relations use
case, erasing the generic PostGIS framing and leading with a problem
statement instead of the plugin's capabilities. This PR re-leads the
README with features, adds a table of contents, and documents every
capability with an ORM example where we have test coverage and a
GraphQL example otherwise — with spatial relations positioned as one
feature among many.
What changed:
capability.
preset.
select: { geom: { select: { geojson: true } } }(lifted fromgraphql/orm-test/__tests__/mega-query.test.ts).fields table plus a GraphQL example.
length/area/perimeter) —subtype → fields table plus GraphQL example, with a note that
these are geodesic client-side helpers on top of GeoJSON, not a
replacement for projection-aware SQL computed columns.
centroid/bbox/numPoints) —GraphQL example, with guidance to use custom SQL functions for
parametric
ST_Transform/ST_Buffer/ST_Simplify/ST_MakeValid.distance / 2D+ND bbox / directional bbox) with two ORM examples
lifted from
graphql/orm-test/__tests__/postgis-spatial.test.ts.stExtent/stUnion/stCollect/stConvexHull) — GraphQL example.tight "Why a dedicated primitive" blurb, tag grammar + stacking,
operator reference, ORM examples for
some/every/noneand parametric
st_dwithin(lifted fromgraphql/orm-test/__tests__/postgis-spatial-relations.test.ts),a GraphQL example, composition, self-relations, generated SQL
shape, indexing,
geometryvsgeography, and FAQ.happens when the extension is missing.
All ORM code samples are taken from live tests in
graphql/orm-test/__tests__/. GraphQL examples are used for fieldswhere we don't have dedicated ORM integration tests (dimension
accessors, measurement / transformation field selection, aggregate
fields) — all of which are unambiguously present in the generated
GraphQL schema via the plugins they ship with.
Docs-only; no source changes.
Review & Testing Checklist for Human
problem statement) read the way you want it to?
section on GitHub's rendered markdown.
reconstructed from
graphql/query/src/types/query.tsandgraphql/orm-test/__tests__/postgis-spatial.test.ts; flaganything that shouldn't be surfaced here.
own as a feature with its own motivation paragraph (without
taking over the whole README).
Notes
shape, indexing,
geometryvsgeography, and FAQ content arepreserved verbatim from the previous version — only re-leveled
under the new
## Spatial relationsheading.Link to Devin session: https://app.devin.ai/sessions/b1b7eb41d9634d289a6b8afadc051051
Requested by: @pyramation