graphql-engine/console
Erik Magnusson 61ccf968b9 feature (console): disable query and subscription root fields
## Description 🔖

Adding root field level section for permissions for select and subscriptions.
One can choose specific root permissions per role that can be enabled or disabled. This is done on a role basis.

By default the permissions does not exist. When this is the case, all permission are enabled per default.
Once a permission has been tampered with, the permissions work as expected by the ui.

## Related Issues 👾

Jira issue: https://hasurahq.atlassian.net/browse/CON-259

## Solution and Design 🎨

Feature showcase video recording: https://app.iterspace.com/recording/6faa1c87-fd17-450b-ac57-3a788bfcc6e4

The solution is made in our legacy part of the Data -> Permissions-tab. The section is going to be migrated in a short future.

### Steps to test

- go to Data tab -> any table -> Permissions tab
- create and edit roles by playing around with the new "Root fields permissions" section

## Known issues
The vertical alignment of the "Don't ask me again" is not the expected one.
It is due to the current `Checkbox` component that includes a label and an error message div, that is not needed in this use case.

As discussed with @nicoinch I could refactor the current `Checkbox` component into a `FormCheckbox` component, make a new atom component `Checkbox` with the input and right label only, and use it inside the `FormCheckbox`.

This will be done on another card ([CON-415](https://hasurahq.atlassian.net/browse/CON-415))

![image](https://user-images.githubusercontent.com/59067245/181784002-19b07ff2-5eb4-4867-92d8-4d2e51afbeb3.png)

### Typescript & State management

- [x] Migrate modified JS files to TS

### Pro console
- [x] Pro console build has been verified. If this check is not relevant, please remove this line.

## Changelog ✍️

- [x] `CHANGELOG.md` is updated with user-facing content relevant to this PR. If no changelog is required, then add the `no-changelog-required` label.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4873
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
Co-authored-by: Luca Restagno <59067245+lucarestagno@users.noreply.github.com>
GitOrigin-RevId: 51aa05af3c4de4dea957e7a12aaf4108e797d3ba
2022-08-05 08:53:11 +00:00
..
.storybook console: migrate REST endpoint form to new components 2022-06-30 14:17:52 +00:00
cypress console: e2e test for graphql customization while adding data source 2022-07-21 09:31:55 +00:00
docs console: Define a testing strategy 2022-08-03 11:35:17 +00:00
exports console: React bootstrap tooltip migration 2022-08-03 12:39:30 +00:00
public console(local-dev): remove ssr for local development 2022-07-20 16:05:04 +00:00
scripts workflow: add lint and format action for console (#4501) 2020-05-29 16:45:43 +05:30
src feature (console): disable query and subscription root fields 2022-08-05 08:53:11 +00:00
static console: migrate REST endpoint form to new components 2022-06-30 14:17:52 +00:00
webpack console(local-dev): remove ssr for local development 2022-07-20 16:05:04 +00:00
.babelrc console: add storybook support 2021-09-20 16:31:25 +00:00
.eslintignore Console/permissions tab component 2022-03-08 07:46:19 +00:00
.eslintrc console: upgrade to node 16 and npm 8 2022-08-02 13:52:53 +00:00
.gitignore console: migrate REST endpoint form to new components 2022-06-30 14:17:52 +00:00
.npmignore console: package modules from oss 2021-03-17 18:59:18 +00:00
.nvmrc console: upgrade to node 16 and npm 8 2022-08-02 13:52:53 +00:00
.prettierignore console: fix linter config (#4137) 2020-04-06 16:53:04 +05:30
cypress-local.config.ts console: Update Cypress to v10 and run the migration guide 2022-07-05 08:51:35 +00:00
cypress.config.ts console: Update Cypress to v10 and run the migration guide 2022-07-05 08:51:35 +00:00
hasuraconfig.js add console to graphql-engine 2018-06-28 10:27:37 +05:30
jest.config.js Console: jest tests files regexp + refactoring 2022-08-03 14:53:24 +00:00
Makefile console: Automatically install node_modules. 2022-06-03 12:40:27 +00:00
package-lock.json console: upgrade to node 16 and npm 8 2022-08-02 13:52:53 +00:00
package.json console: upgrade to node 16 and npm 8 2022-08-02 13:52:53 +00:00
postcss-storybook.config.js console: migrate REST endpoint form to new components 2022-06-30 14:17:52 +00:00
postcss.config.js console: add tailwindcss for styles 2021-08-10 13:46:52 +00:00
README.md console: Define a testing strategy 2022-08-03 11:35:17 +00:00
tailwind-storybook.config.js console: migrate REST endpoint form to new components 2022-06-30 14:17:52 +00:00
tailwind.config.js console: add horizontal variants for form fields wrapper CON-403 2022-07-29 18:12:59 +00:00
tsconfig.json console: add form library components 2021-10-07 09:51:10 +00:00
tsconfig.test.json console: add schema sharing 2021-07-08 08:18:25 +00:00

Hasura Console

The Hasura console is an admin dashboard to manage the connected database and to try out GraphQL APIs. It is a React application bundled with Webpack and the state is managed mostly using Redux.

Table of contents