-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
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.
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?
- Create a simple view
- Update/Edit comment via Hasura Console
Screenshots or Screencast
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.