hasura / hasura/graphql-engine

Suggested array relationship disappears if object relationship is tracked

Open
#9,435 1 comment 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: 2.19.0-beta.1

### Environment

OSS

### What is the current behaviour?

In the new relationship UI, if an object relationship via foreign key is tracked, the array relationship corresponding to that foreign key disappears from console

### What is the expected behaviour?

Suggested array relationship should not disappear.

### How to reproduce the issue?

1. Make sure 'New Relationship tab UI for tables/views' is enabled.
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. Navigate to /console/data/default/schema/public/tables/author/relationships and http://localhost:8081/console/data/default/schema/public/tables/book/relationships and observe that the suggested relationships displays as expected.
Screenshot 2023-02-14 at 7 11 08 PM
Screenshot 2023-02-14 at 7 11 19 PM
4. Navigate to /console/data/default/schema/public/tables/book/relationships and track the suggested object relationship.
5. Navigate to /console/data/default/schema/public/tables/author/relationships and observe that the relationship that was suggested earlier has now disappeared.
Screenshot 2023-02-14 at 7 12 55 PM

### Any possible solutions/workarounds you're aware of?

Disable 'New Relationship tab UI for tables/views' from /console/settings/feature-flags

### Keywords

Array relationship

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.