Skip to content

Documentation missing #10

Open
Open
@lamuertepeluda

Description

The documentation on how to use filters is unclear/missing. I think you should provide at least 1 example.

I tried to filter by a point on the following table containing polygons of several countries, guessing from several issues of the posgraphile ecosystem.

CREATE TABLE public.countries (
	ogc_fid serial NOT NULL,
	id varchar NULL,
	"name" varchar NULL,
	wkb_geometry geometry NULL,
	CONSTRAINT countries_pkey PRIMARY KEY (ogc_fid)
);
{
  allCountries(filter: {wkbGeometry: {containsProperly: "{\"type\":\"Point\",\"coordinates\":[14.996638298034668,41.04304487986917]}"}}) {
    nodes {
      wkbGeometry {
        geojson
      }
    }
  }
}

I always get:

{
  "errors": [
    {
      "message": "unknown GeoJSON type",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "allCountries"
      ]
    }
  ],
  "data": {
    "allCountries": null
  }
}

No matter how I pass the point (wkt, json, full point feature...). Is it me passing the wrong argument? Is some weird parsing/escaping (I would suggest to also support WKT/EWKT).

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions