Hasura Console "Relation does not exist"
See original GitHub issueI am running a Hasura locally using docker compose with a hasura container and a postgres container.
I am using migrations and making changes to my local container with hasura console
. I am trying to run SQL in order to insert data into my database. Any query that references public.placeTypes
gives an error along these lines:
{
"statement": "SELECT * FROM public.placeTypes",
"prepared": false,
"error": {
"exec_status": "FatalError",
"hint": null,
"message": "relation \"public.placetypes\" does not exist",
"status_code": "42P01",
"description": null
},
"arguments": []
}
The console shows the table public.placeTypes
, and when I connect to the postgres container, I also see the table there as well.
I am able to insert data using the console, but not using SQL
I commented here since I was seeing some issues with my migrations: https://github.com/hasura/graphql-engine/issues/1211#issuecomment-541475896, but I don’t know if that is at all related to this issue
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (4 by maintainers)
Top Results From Across the Web
Postgres: Creating Relationships | Hasura GraphQL Docs
A relationship from one table/view to another can be created by defining a link between a column of the table/view to a column...
Read more >Troubleshooting Hasura GraphQL engine errors
Should there be any error coming from the Hasura console UI, they will show up in the Browser dev tools. Remote service logs....
Read more >Setting Up a GraphQL Schema Using an Existing Postgres ...
When you have an existing database with a schema already present, you don't need to create tables or views or run DDL queries...
Read more >Managing Metadata | Hasura GraphQL Docs
If you are only using the Hasura Console from the Hasura CLI then it will be kept fully updated as you make changes....
Read more >Relationships with Hasura | Hasura GraphQL Tutorial
This is achievable using nested queries if a relationship exists between the two. ... Hasura Console automatically suggests relationships based on these ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@afreix I took a quick look. The table name is
placeTypes
and whenever you have capital letters in a relation name, you should use double quotes ("
) around it. Otherwise, Postgres just lower cases everything.Try
SELECT * FROM "public"."placeTypes"
I’ve had the same issue, and manually moving functions to the bottom of the migration script helped