Skip to content

docs(graphile-postgis): feature-led README with TOC and ORM examples per capability#1003

Merged
pyramation merged 2 commits intomainfrom
feat/postgis-readme-cleanup
Apr 18, 2026
Merged

docs(graphile-postgis): feature-led README with TOC and ORM examples per capability#1003
pyramation merged 2 commits intomainfrom
feat/postgis-readme-cleanup

Conversation

@pyramation
Copy link
Copy Markdown
Contributor

@pyramation pyramation commented Apr 18, 2026

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:

  • New feature-led intro + Table of contents jumping to every
    capability.
  • Features at a glance checklist covering every plugin in the
    preset.
  • One section per capability — each with a concrete usage example:
    • GeoJSON scalar and typed geometry columns — ORM
      select: { geom: { select: { geojson: true } } } (lifted from
      graphql/orm-test/__tests__/mega-query.test.ts).
    • Dimension-aware interfaces and subtype fields — subtype →
      fields table plus a GraphQL example.
    • Measurement fields (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.
    • Transformation fields (centroid / bbox / numPoints) —
      GraphQL example, with guidance to use custom SQL functions for
      parametric ST_Transform / ST_Buffer / ST_Simplify /
      ST_MakeValid.
    • Per-column spatial filters — full taxonomy (topological /
      distance / 2D+ND bbox / directional bbox) with two ORM examples
      lifted from graphql/orm-test/__tests__/postgis-spatial.test.ts.
    • PostGIS aggregate fields (stExtent / stUnion /
      stCollect / stConvexHull) — GraphQL example.
    • Spatial relations — promoted to a top-level feature with a
      tight "Why a dedicated primitive" blurb, tag grammar + stacking,
      operator reference, ORM examples for some / every / none
      and parametric st_dwithin (lifted from
      graphql/orm-test/__tests__/postgis-spatial-relations.test.ts),
      a GraphQL example, composition, self-relations, generated SQL
      shape, indexing, geometry vs geography, and FAQ.
    • Graceful degradation — explicit section describing what
      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 fields
where 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

  • Skim the new opening — does leading with features (instead of a
    problem statement) read the way you want it to?
  • Scroll the TOC and confirm every anchor resolves to a real
    section on GitHub's rendered markdown.
  • Sanity-check the Per-column spatial filters taxonomy — it's
    reconstructed from graphql/query/src/types/query.ts and
    graphql/orm-test/__tests__/postgis-spatial.test.ts; flag
    anything that shouldn't be surfaced here.
  • Confirm the Spatial relations section still stands on its
    own as a feature with its own motivation paragraph (without
    taking over the whole README).

Notes

  • Green-risk: docs-only, no code touched.
  • Operator reference, composition, self-relations, generated SQL
    shape, indexing, geometry vs geography, and FAQ content are
    preserved verbatim from the previous version — only re-leveled
    under the new ## Spatial relations heading.

Link to Devin session: https://app.devin.ai/sessions/b1b7eb41d9634d289a6b8afadc051051
Requested by: @pyramation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

…pability; spatial relations as one feature among many
@devin-ai-integration devin-ai-integration bot changed the title docs(graphile-postgis): restore generic PostGIS intro; scope spatial relations as its own feature docs(graphile-postgis): feature-led README with TOC and ORM examples per capability Apr 18, 2026
@pyramation pyramation merged commit 53adb7e into main Apr 18, 2026
51 checks passed
@pyramation pyramation deleted the feat/postgis-readme-cleanup branch April 18, 2026 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant