graphile / graphile/postgis

Error: Unsupported PostGIS modifier --> ?

Open
#47 4 comments 0 reactions 0 assignees View on GitHub
🐛 bug
Dominant language
TypeScript
Stars
90
Forks
13
PR merge metrics
No merged PRs in 30d

Description

### Summary

what is _ ```Error: Unsupported PostGIS modifier``` _ in
```
export const getGISTypeDetails = (modifier: number): GISTypeDetails => {
const allZeroesHopefully = modifier >> 24;
if (allZeroesHopefully !== 0) {
throw new Error("Unsupported PostGIS modifier");
}
[...]
```

### Steps to reproduce
Versioning (latest & greatest?)
```
Node.js version: v18.6.0 on linux x64

postgraphile -V 4.12.11

CREATE EXTENSION IF NOT EXISTS postgis SCHEMA public VERSION "3.2.1";

PostgreSQL 14.4 (Debian 14.4-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit

```
Error:

```
graphql_1 | Error: Unsupported PostGIS modifier
graphql_1 | at exports.getGISTypeDetails (/usr/local/lib/node_modules/@graphile/postgis/dist/utils.js:7:15)
graphql_1 | at getGisType (/usr/local/lib/node_modules/@graphile/postgis/dist/PostgisRegisterTypesPlugin.js:117:41)
graphql_1 | at /usr/local/lib/node_modules/@graphile/postgis/dist/PostgisRegisterTypesPlugin.js:206:20
graphql_1 | at Object.getGqlTypeByTypeIdAndModifier (/usr/local/lib/node_modules/postgraphile/node_modules/graphile-build-pg/node8plus/plugins/PgTypesPlugin.js:816:26)
graphql_1 | at fieldWithHooks.pgFieldIntrospection (/usr/local/lib/node_modules/postgraphile/node_modules/graphile-build-pg/node8plus/plugins/PgColumnsPlugin.js:106:30)
graphql_1 | at fieldWithHooks (/usr/local/lib/node_modules/postgraphile/node_modules/graphile-build/node8plus/makeNewBuild.js:483:29)
graphql_1 | at /usr/local/lib/node_modules/postgraphile/node_modules/graphile-build-pg/node8plus/plugins/PgColumnsPlugin.js:97:22
graphql_1 | at Array.reduce ()
graphql_1 | at /usr/local/lib/node_modules/postgraphile/node_modules/graphile-build-pg/node8plus/plugins/PgColumnsPlugin.js:86:44
graphql_1 | at SchemaBuilder.applyHooks (/usr/local/lib/node_modules/postgraphile/node_modules/graphile-build/node8plus/SchemaBuilder.js:264:20)
```

### Expected results
Plugin loads

### Actual results

Plugin "unsupported"

### Additional context

Recently built postgis with postgresql database. Far as I can tell, _everything_ is up to date. The error appears related to the specific code bit, without any comment on the context of the `allZeroesHopefully`.

Definitely willing to debug further if guidance is provided.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.