question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Console: "Expected value of type geography" when inserting point

See original GitHub issue

Hello hasura team,

I have a table created by running the following command

CREATE TABLE "testPlaceDetails" (
  id SERIAL PRIMARY KEY,
  name TEXT,
  type TEXT,
  location GEOGRAPHY(Point)
)

when trying to insert via the console, I get an error “Expected value of type geography” for the location property

{
  "object": {
    "name": "Eiffel Tower",
    "location": {
      "point": {
        "type": "Point",
        "coordinates": [1,1]
      }
    }
  }
}

when I go into the explorer tab, I see that location is of type geography, but clicking into geography brings me to a blank screen.

I’ve also executed the follow SQL commands in the SQL tab on the console

CREATE EXTENSION IF NOT EXISTS postgis;
CREATE EXTENSION IF NOT EXISTS postgis_topology;

as mentioned here: https://blog.hasura.io/graphql-and-geo-location-on-postgres-using-hasura-562e7bd47a2f/

Based on the docs I would have expected this to work

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:2
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
sangdthcommented, Dec 12, 2020

I’m still seeing the error today. ~And it doesn’t allow me to execute the mutation.~ Ah I can insert it despite the error showing…

~How can I overcome this issue?~

Screenshot 2020-12-11 at 21 24 15
6reactions
alexander-martcommented, Apr 1, 2022

@rikinsk This error from GraphQL console is still actual. Hasura version: v2.2.0 https://github.com/hasura/graphql-engine/issues/3272#issuecomment-743382617

Read more comments on GitHub >

github_iconTop Results From Across the Web

Entity Framework Core saving geography::Point throws "The ...
Entity Framework Core saving geography::Point throws "The supplied value is not a valid instance of data type geography".
Read more >
Error importing Shapefile to PostGIS using Importer GUI
The message you are getting is that 'type geography does not exist' This either means you did not install postgis correctly or you...
Read more >
Working with geospatial data | BigQuery - Google Cloud
In BigQuery, the GEOGRAPHY data type represents a geometry value or geometry collection. To represent spatial features, create a table with a GEOGRAPHY...
Read more >
How to Calculate Expected Value in R? - GeeksforGeeks
x: data input vector; weights: It is weight of input data. Returns: weighted mean of given values. Example: Calculate expected value.
Read more >
Querying spatial data in Amazon Redshift
You can use the GEOGRAPHY data type to hold the values of spatial data. ... object as an argument expect this GEOMETRY object...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found