-
Notifications
You must be signed in to change notification settings - Fork 2.8k
propagate Postgres table comments to GraphQL schema descriptions (close #446) #2397
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
Conversation
|
Beep boop! 🤖 Hey @ajeetdsouza, thanks for your PR! One of my human friends will review this PR and get back to you as soon as possible. 🕐 Stay awesome! 😎 |
|
Deploy preview for hasura-docs ready! Built with commit 458506c |
|
Review app for commit db9f137 deployed to Heroku: https://hge-ci-pull-2397.herokuapp.com |
|
@ajeetdsouza |
|
@rakeshkky |
|
Review app for commit 10635b3 deployed to Heroku: https://hge-ci-pull-2397.herokuapp.com |
|
@ajeetdsouza Why aren't we propagating other comments? Let's just propagate all of them? In order of priority, I would say:
|
|
Review app for commit ac8f9b1 deployed to Heroku: https://hge-ci-pull-2397.herokuapp.com |
|
Review app for commit c26324b deployed to Heroku: https://hge-ci-pull-2397.herokuapp.com |
|
I don't think this is correct. They show up in the wrong place on the graphql docs explorer |
|
Review app for commit 06cfe5c deployed to Heroku: https://hge-ci-pull-2397.herokuapp.com |
lexi-lambda
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rakeshkky I think this LGTM, but could I ask you to rebase to resolve the merge conflicts?
…ngine into issue-446-comments
|
Review app for commit e22bebc deployed to Heroku: https://hge-ci-pull-2397.herokuapp.com |
Resolve Conflicts: server/src-exec/Migrate.hs server/src-lib/Hasura/GraphQL/Schema.hs server/src-lib/Hasura/GraphQL/Schema/BoolExp.hs server/src-lib/Hasura/GraphQL/Schema/Mutation/Common.hs server/src-lib/Hasura/GraphQL/Schema/Select.hs server/src-lib/Hasura/RQL/DDL/Schema/Diff.hs server/src-lib/Hasura/RQL/DDL/Schema/Function.hs server/src-lib/Hasura/RQL/DDL/Schema/Table.hs server/src-lib/Hasura/RQL/DML/Internal.hs server/src-lib/Hasura/RQL/DML/Returning.hs server/src-lib/Hasura/RQL/GBoolExp.hs server/src-lib/Hasura/RQL/Types/Common.hs server/src-lib/Hasura/RQL/Types/SchemaCache.hs server/src-rsr/catalog_metadata.sql server/src-rsr/initialise.sql server/src-rsr/migrate_from_19_to_20.sql server/src-rsr/table_meta.sql
|
Review app for commit 8254304 deployed to Heroku: https://hge-ci-pull-2397.herokuapp.com |
|
I still don't believe this to be fixed. I went ahead and created a table and a column on the heroku instance. I can't see the comment I added for the column when I browse through docs. |
@mastoj Thank you reporting this. This has been fixed in the next commit. |
|
Review app for commit 10f2ec0 deployed to Heroku: https://hge-ci-pull-2397.herokuapp.com |
|
@rakeshkky nice. Verified that it works. |
|
Review app for commit 4c5b326 deployed to Heroku: https://hge-ci-pull-2397.herokuapp.com |
|
@lexi-lambda Ready to be merged. But please have a final glance. :) |
|
Review app for commit 4111019 deployed to Heroku: https://hge-ci-pull-2397.herokuapp.com |
|
Review app for commit 458506c deployed to Heroku: https://hge-ci-pull-2397.herokuapp.com |
|
Review app https://hge-ci-pull-2397.herokuapp.com is deleted |
Description
The console currently allows a user to add a description to a table via

Data > Schema > schema_name > table_name > Modify, but it does not show this description anywhere else. This PR adds descriptions to the GraphQL schema, viewable via the Documentation Explorer:Affected components
Related Issues
#446
Solution and Design
Descriptions are stored via Postgres comments, viewable in the
pg_descriptionstable. Adescriptionsfield has been added to thehdb_catalog.hdb_table_info_aggview, and this description is concatenated with the default description when being served to the frontend.Steps to test and verify
Add a description to any of the tables as described above. It should now be visible in the Documentation Explorer.
Limitations, known bugs & workarounds
None
To the Reviewer (server)
18. A migration for this has been added (from17To18), which drops thehdb_catalog.hdb_table_info_aggview and recreates it with an addeddescriptionfield.PGDescriptionhas been added.TableInfonow has a new field for descriptions:tiDescription :: Maybe PGDescription.mkTableObj,mkGCtxRole,mkGCtxRole'.Critical files:
src-exec/Migrate.hssrc-lib/Hasura/SQL/Types.hssrc-lib/Hasura/GraphQL/Schema.hssrc-lib/Hasura/RQL/Types/SchemaCache.hssrc-rsr/initialise.sqlsrc-rsr/migrate_from_17_to_18.sql