import 'graphile-build-pg'; import type { GraphileConfig } from 'graphile-config'; /** * PostgisCodecPlugin * * Teaches PostGraphile v5 how to handle PostgreSQL's geometry and geography types. * * This plugin: * 1. Creates codecs for geometry/geography via gather.hooks.pgCodecs_findPgCodec * 2. The registered codecs use castFromPg to wrap geometry values in * json_build_object() with __gisType, __srid, __geojson metadata * 3. fromPg normalizes the geometry type names for resolveType lookups * * Without castFromPg, PostGraphile defaults to `column::text` which returns * WKB hex — unusable for GraphQL. The json_build_object wrapper provides * structured metadata that downstream plugins use for type resolution and * field values (x/y coordinates, GeoJSON, SRID, etc.). */ export declare const PostgisCodecPlugin: GraphileConfig.Plugin;