hasura / hasura/graphql-engine
Suggested array relationship disappears if object relationship is tracked
- 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.
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.

### 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
Assessment
This issue has not been assessed yet.