hasura / hasura/graphql-engine
Console breaks with the error "TypeError: Cannot convert undefined or null to object"
- 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 -

### 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.

### 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
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