hasura / hasura/graphql-engine

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

Open
#9,434 3 comments 0 reactions 0 assignees View on GitHub
k/bug
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### 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 -
```sql
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 -
- Disable the feature flag 'New Relationship tab UI for tables/views', or
- Track the opposite relationship, that is the object relationship from _book_ to _author_, or
- Downgrade to v2.18

### Keywords

cannot convert undefined

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure by creating the author and book tables, tracking the suggested array relationship, enabling the New Relationship tab UI feature flag, and opening the stated relationships URL. Start from the Relationships tab error and its TypeError trace; done means the console renders that relationship page without breaking.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgres, typescript
Domain
databases, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.