-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tracking all suggested relationships in console has to be documented #2726
Comments
@ecthiender Great! Thank you for letting me know that! |
@ecthiender Then what if docs explicitly mention this feature? If so, users would not have to waste their time. Currently, as far as I know, docs doesn't say this feature. |
I agree the button "Track All" under "Untracked foreign-key relations" in the the"Data" page is EXTREMELY USEFUL. Otherwise, it would be practically impossible to use Hasura on an existing database with a large number of relationships. But what is still missing is an API endpoint to do that: "Track all relationships inferred from db structure" (more precisely, the subset of tracked tables). Because it really is the ONLY step that cannot be automated (i.e. performed through the API).
True, you can create individual relationships though create_array_relationship and create_object_relationship but it is a lot of work to build the many queries to do the same as the "Track All" button on the GUI. In my company we are starting to use Hasura to expose postgres dBs. Unfortunately this manual step breaks the workflow. I'm surprised this endpoint is not already in the API. I would seem very natural since the work is already done, right ? Is there a reason beyond 'nobody asked for it' ? Apart from that, I would like to congratulate the Hasura team for the superb work. It is a very useful and promising piece of software !!! |
@oscar6echo +1 P.S.0. In my humble opinion, your suggestion should be an independent issue as it's a 'feature request' for API, while this issue is now a 'docs request'. P.S.1. Using an e2e testing tool would enable a workaround by "clicking" the button in an automatic way. |
@oscar6echo It is not encouraged to "click the button" to track all tables or relationships in a production environment. You should do that once in your dev env and then export the metadata and use import this metadata later in other instances. See https://docs.hasura.io/1.0/graphql/manual/migrations/manage-metadata.html on how you can use the API to export/import metadata. |
Ok, understood. |
Closed via #4948 |
Hasura recommends relationships, based on foreign keys. So users just can "click" the button to create the relationships like this image.
However, for existing databases with 'many' tables, manually clicking all the buttons is so tedious. Therefore I request a feature to accept EVERY recommended relationships with one click.
The text was updated successfully, but these errors were encountered: