这是indexloc提供的服务,不要输入任何密码
Skip to content

Have a way to disable the auto-generated comments on tables and views #7496

@lorenzo

Description

@lorenzo

Hasura tries to be helpful when documenting the API it generates from the database. Unfortunately, it adds too much information sometimes, which leaks aspects of the database design that are often not relevant to the end consumer of the API.

Here's an example:

create schema foo;
create view foo.my_crazy_named_view_v2 as
   select 1::bigint as id, 'foo' as name;
comment on view foo.my_crazy_named_view_v2 is 'A nice comment about this';

Track the foo.my_crazy_named_view_v2 and give it a root name like MyFoos
When inspecting the generated schema you will find the following comment on the MyFoos type:

A nice comment about this
columns and relationships of "foo.my_crazy_named_view_v2"

The second line was generated by hasura. I would like to have the following:

  • A way to entirely disable generated comments, regardless of whether or not the relation has a comment already
  • Refrain from appending the auto-generated comment if the relation already has a comment of its own.
  • Have a way to add a comment in the metadata that is entirely independent of the comment in the database.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions