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

Console: Error when editing comment on a view #8846

@gnekich

Description

@gnekich

Version Information

Server Version: <= v2.11.0-beta.1
CLI Version (for CLI related issue): (unrelated) v2.11.0-beta.1

Environment

Cloud / OSS / EE

What is the current behaviour?

Whenever someone tries to edit comment on the view the error message will pop out.
hasura-bug-comment-view

What is the expected behaviour?

No error message and migration file created when tracking the change via CLI hasura console

How to reproduce the issue?

  1. Create a simple view
  2. Update/Edit comment via Hasura Console

Screenshots or Screencast

Error received in the console
hasura-bug-comment-view

Error in postgres
hasura-bug-comment-view-pg-error

Please provide any traces or logs that could help here.

The generated SQL statement is wrong, the root cause is the reusing of UI table component to edit comments for the view and table, and not passing and checking tableType while doing so.

Any possible solutions?

Check if the tableType is 'view' if so generate a different query.
I've created a fix, and will link PR, but maybe an additional refactor will be needed after the UI lead understands the issue and decide if reusing the table component is good enough.

Can you identify the location in the source code where the problem exists?

The missing feature affects all supported dataSources, in my case, it is the postgresql
graphql-engine/console/src/dataSources/services/postgresql/sqlUtils.ts
PR should cover all the DS.

If the bug is confirmed, would you be willing to submit a PR?

Yes, I'm writing this issue to link it to the PR :)

Keywords

edit view, comment, edit, console, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions