hasura / hasura/graphql-engine

hasura console error: Cannot read properties of undefined (reading 'rel_def')

Open
#7,526 9 comments 4 reactions 0 assignees View on GitHub
c/console k/bug support/needs-more-info
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Version Information

Server Version: v2.0.9
CLI Version (for CLI related issue): v2.0.9

### Environment

OSS

### What is the expected behaviour?

Working permissions.

### Keywords

rel_def

### What is the current behaviour?

Console UI raise error when trying to edit permissions. Permissions are working.

### How to reproduce the issue?

DB
public schema
```
entity1:
id
some_id
```

another schema
```
entity2:
id
entity3:
entity2_id
entity1_id
```

PERMISSIONS
```
table:
name: entity1
schema: public
insert_permissions:
- permission:
backend_only: false
check:
_exists:
_table:
name: entity2
schema: another
_where:
# some another permissions
- entity3: # <-- relation
entity1:
_ceq: # <-- error
- $
- id
```

### Please provide any traces or logs that could help here.

```
TypeError: Cannot read properties of undefined (reading 'rel_def')
at y (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.0/main.js.gz:1:1647099)
at https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.0/main.js.gz:1:1648319
at Array.reduce ()
at O (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.0/main.js.gz:1:1648245)
at n (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.0/main.js.gz:1:5815760)
at n (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.0/main.js.gz:1:5818411)
at n (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.0/main.js.gz:1:5820813)
at n (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.0/main.js.gz:1:5823549)
at n (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.0/main.js.gz:1:5829846)
at n (https://graphql-engine-cdn.hasura.io/console/assets/channel/stable/v2.0/main.js.gz:1:5822843)
```

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.