no such column exists for PostgreSQL db in Hasura (Graphql) console when adding column via DBeaver

no such column exists for PostgreSQL db in Hasura (Graphql) console when adding column via DBeaver


6

I just tested modifying a table in my PostgreSQL db through DBeaver and it seems to have broken the db when looking at the data from the Hasura (Graphql) console. I simply added a column from Dbeaver. In Hasura I get an error "no such column exists". Anyone have any idea why or how I can fix this?

2

  • Could you show us your SQL statements that altered that table? And why do you think you broke the database? Are there any error messages in your PostgreSQL server log? And Yes, it looks like Hasura is looking for a column that doesn't exist (anymore). You could create that column, if you know what column it is.

    – Frank Heikens

    Jan 10, 2021 at 13:39

  • Thanks @FrankHeikens. It was a conflict in the meta data in the console.

    – virtualbis

    Jan 11, 2021 at 0:32

3 Answers
3


11

Hasura support helped me pinpoint it to the metadata stored in the Graphql console. Hope this helps someone else save a little time.

"If you make DDL changes to your database from outside Hasura, you must manually reload the Hasura metadata so that Hasura knows that something has changed and it adapts to those changes accordingly.You can reload the metadata by clicking on the settings icon on the top right in console."

2

  • 1

    And don't forget to add permission for new colunns for roles other than "admin"

    – Alex Yu

    Jan 14, 2021 at 5:33

  • 3

    I had to check "Reload all databases" as well

    – altschuler

    Oct 19, 2022 at 16:52


2

you have to update the metadata, from the console it would be:

hasura metadata reload


0

You need to reload the metadata so Hasura knows that new data has been added. Click the gear icon > Reload metadata > Reload

no such column exists for PostgreSQL db in Hasura (Graphql) console when adding column via DBeaver



Leave a Reply

Your email address will not be published. Required fields are marked *