graphql-engine icon indicating copy to clipboard operation
graphql-engine copied to clipboard

Hasura local console error "parsing RQLMetadata failed, expected Object, but encountered Array"

Open nicaura opened this issue 2 years ago • 5 comments

Version Information

Server Version: v2.16.0 CLI Version (for CLI related issue): v2.16.0

Environment

Local docker image hasura/graphql-engine:v2.16.0

What is the current behaviour?

Everytime we tried to update metadata through the console launched through hasura console we get the following error :

{ "code": "parse-failed", "error": "parsing RQLMetadata failed, expected Object, but encountered Array", "path": "$" }
Screenshot 2022-12-05 at 20 08 14

What is the expected behaviour?

Metadata yaml files to be updated locally.

How to reproduce the issue?

  1. hasura console
  2. Update any metadata

Please provide any traces or logs that could help here.

From the Chrome console : Screenshot 2022-12-05 at 20 12 24

Any possible solutions/workarounds you're aware of?

Update metadata manually.

nicaura avatar Dec 05 '22 19:12 nicaura

Hi!

I had the exact same issue and it drove me mad, it seem like if you turn off migrations from the console this happens.

So make sure to have it on, at least it worked for me.

Screenshot 2023-01-06 at 01 11 52

Have a nice day!

sounden avatar Jan 06 '23 00:01 sounden

Providing simple repro steps for the engineering team -

  1. Create an untracked table -
    CREATE TABLE table1(id SERIAL PRIMARY KEY, field TEXT);
    
  2. Make sure migrations are disabled - Screenshot 2023-02-10 at 3 55 57 PM
  3. Try to track the table - Screenshot 2023-02-10 at 3 57 58 PM

Issue exists even in v2.19.0-beta.1.

harishnair96 avatar Feb 10 '23 10:02 harishnair96

It has not been fixed yet

phamquyhai avatar Sep 30 '23 09:09 phamquyhai

+1

mrpotato3 avatar Jun 29 '24 16:06 mrpotato3

Wasted a cool 3 hours on that one until I found this issue :/

running v2.47.0

How about just a heads up to turn on migrations instead of this error that leads to nowhere

initplatform avatar Jun 02 '25 16:06 initplatform