-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explicit GraphQL input types for Point, Line, Polygon #3
Comments
Sorry, I conflated a few different issues here. This is only concerning Input types. (On the query side, you already have explicit types for each subtype, e.g. GeometryPoint.) |
Nah, just simplicity - trivially easy to feed the GeoJSON to the DB. If they need different input types so be it 👍 |
Not sure if it's related (or just me doing something wrong, even if the code works) - but graphiql complains about the type on GeoJSON variables, so it's not trivial to check they're correctly formatted (I got a Polygon wrong by missing the extra nesting, and needed the backend error to notice etc): {
"point": {
"type": "Point",
"coordinates": [
-1.232,
51.660
]
}
} |
GraphiQL doesn’t like the JSON scalar either. |
Is there a benefit to using a single GraphQL input type (GeoJSON)? For web mapping purposes, you usually need to know whether you're dealing with points, lines, or polygons, so I would prefer to see GeoJSONPoint, GeoJSONLine, etc. exposed in the GraphQL schema.
The text was updated successfully, but these errors were encountered: