hasura / hasura/graphql-engine

Console breaks when doing table-to-native query relationship

Open
#10,167 0 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.37.1
CLI Version (for CLI related issue): v2.37.1

### Environment

### What is the current behaviour?

I have a table, and on that table I created an array relationship to a native query. This behavior isn't explicitly documented, but does technically work.

However, Now I have issues in the console when trying to access the data tab (only applies to the specific database in which the table/native query belong). This isn't just when trying to go to that specific table, but any table in the database. It just hangs in a "loading data" state.

### What is the expected behaviour?
Console works normally

### How to reproduce the issue?

1. create a parent-child array relationship between a table and a native query
2. apply metadata in yaml file.
3. navigate anywhere in the console.

### Screenshots or Screencast

yaml to configure relationship (from table "metric"):
![image](https://github.com/hasura/graphql-engine/assets/118403025/31827c1e-e37c-4b5b-a01c-77b140a0e4cf)

Console:
![Error Screenshot](https://github.com/hasura/graphql-engine/assets/118403025/e0475ea1-5598-4bf4-ab91-dee3a0bb9861)

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

It seems that the console doesn't explicitly support this kind of relationship, but the engine does.

### Keywords
native query, logical model, relationships

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue in the Console data tab using the table-to-native-query relationship and YAML metadata described above. Trace the database loading path, then verify that navigating to any table in the affected database no longer remains stuck in a loading state.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
database, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.