hasura / graphql-engine

Blazing fast, instant realtime GraphQL APIs on your DB with fine grained access control, also trigger webhooks on database events.
https://hasura.io
Apache License 2.0
31.09k stars 2.77k forks source link

Console breaks with the error "TypeError: Cannot convert undefined or null to object" #9434

Open harishnair96 opened 1 year ago

harishnair96 commented 1 year ago

Version Information

Server Version: v2.19.0-beta.1

Environment

OSS

What is the current behaviour?

Going to 'Relationships' tab shows the error -

Screenshot 2023-02-14 at 4 27 47 PM

What is the expected behaviour?

Console should not break.

How to reproduce the issue?

  1. Create and track the following tables -
    CREATE TABLE author(id BIGINT PRIMARY KEY, name TEXT);
    CREATE TABLE book(id BIGINT PRIMARY KEY, name TEXT, author_id BIGINT REFERENCES author(id));
  2. Track the suggested array relationship from author to book.
  3. Enable 'New Relationship tab UI for tables/views'.
  4. Go to /console/data/default/schema/public/tables/author/relationships

Please provide any traces or logs that could help here.

Screenshot 2023-02-14 at 4 34 10 PM

Any possible solutions/workarounds you're aware of?

Do any one of the following -

Keywords

cannot convert undefined

lucarestagno commented 1 year ago

Thanks for reporting this @harishnair96

We have some improvements over the New Relationships tab that are going to correctly handle this scenario.

We'll keep you posted.

wmurmann commented 1 year ago

Having the same issue

manasag commented 1 year ago

Hi folks, the fix for this is now in v2.20.0-beta.1