hasura / hasura/graphql-engine
Distinguish the tables from views from API
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Is your proposal related to a problem?
no.
### Describe the solution you'd like
I'm currently using `/v1/metadata` a lot in my app (with type: `export_metadata` type as a parameter) I have a lot of tables and views in my DB and want to do some logging tasks in my **tables only** but currently, I haven't any clean and simple option to distinguish the tables from views from this API result:
We just have a list of all tracked objects (a mix of view and table) from this API response like below:
```
metadata.sources[0].tables
```
Hasura returning an `is_enum` property to distinguish regular tables from the enum tables. It would be great if we had a similar property like `is_view` to distinguish the tables from views. Now I have to list all of my views in a hardcoded list to prevent running my logging task on those tracked objects and keeping this hardcoded list update is very annoying. Sometimes I'm adding a new view and I forget to add the new view name in that list and my logging code also runs on the new view.
### Describe alternatives you've considered
Using hardcoded list as describe above
### If the feature is approved, would you be willing to submit a PR?
N/A
Contributor guide
Assessment
This issue has not been assessed yet.