graphql-engine/frontend
Samir Talwar b167aa84d1 console: Add readOnly: true in a few places where necessary.
I set up a local PostgreSQL read replica, loaded the Chinook dataset, and poked around finding bugs here and there. I added `read_only: true` to the relevant SQL queries to mitigate these.

I did not test exhaustively or even that well, and I only tried this with PostgreSQL, so I am sure that I have missed some, but this at least seems to make the console's Data tab usable.

Note that this removes the check for the `READ_ONLY_RUN_SQL_QUERIES` feature flag, which seems pointless, as it's checking whether we're running v1.1.0 of the HGE server or later. I sincerely hope no one is actually running such an old version.

If this change is acceptable, we can probably remove the feature flag logic entirely, but that is not something I want to do here.

[DSF-218]: https://hasurahq.atlassian.net/browse/DSF-218?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8451
Co-authored-by: Luca Restagno <59067245+lucarestagno@users.noreply.github.com>
GitOrigin-RevId: 5f4ebfa8f44e2921071699085b877db78aaa4e24
2023-03-27 22:57:05 +00:00
..
.husky frontend: house keeping 2023-03-21 08:52:51 +00:00
.storybook frontend: update nx to latest 15 2023-02-28 19:42:51 +00:00
.vscode feature (console): clean up the ConnectPostgresWidget component 2023-02-28 07:16:51 +00:00
apps console: e2e snapshot testing for rs-to-x relationships 2023-03-27 14:33:57 +00:00
docker Initial PR for work on frontend docker compose [DSF-193] 2023-03-21 01:24:33 +00:00
docs console: Fix the E2E tests in the frontend directory 2023-01-26 11:19:32 +00:00
libs console: Add readOnly: true in a few places where necessary. 2023-03-27 22:57:05 +00:00
static frontend: apply prettier 2023-01-25 20:55:24 +00:00
tools frontend: fixup process env values 2023-03-21 17:04:12 +00:00
types frontend: sync nx codebase again 2023-01-12 18:18:38 +00:00
.editorconfig frontend: initial nx generation 2022-08-05 18:53:54 +00:00
.eslintignore frontend: update nx to latest 15 2023-02-28 19:42:51 +00:00
.eslintrc.json frontend: house keeping 2023-03-21 08:52:51 +00:00
.gitignore frontend: apply prettier 2023-01-25 20:55:24 +00:00
.lintstagedrc.mjs frontend: house keeping 2023-03-21 08:52:51 +00:00
.npmrc platform: fix graphql codegen in action and graphiql editor 2022-10-18 14:24:14 +00:00
.nvmrc platform(nx): initial oss migration 2022-08-18 19:37:56 +00:00
.prettierignore frontend: apply prettier 2023-01-25 20:55:24 +00:00
.prettierrc ci: introduce frontend related ci 2022-12-16 14:37:27 +00:00
babel.config.json frontend: initial nx generation 2022-08-05 18:53:54 +00:00
control-plane-graphql-codegen.yml control-plane: update generated graphqltypes 2023-02-14 10:10:16 +00:00
custom-webpack.config.js frontend: fixup process env values 2023-03-21 17:04:12 +00:00
frontend.code-workspace frontend: pre sync console into nx 2023-01-23 22:22:02 +00:00
jest.preset.js frontend: update nx to 15.8.1 2023-03-01 14:17:47 +00:00
nx.json frontend: update nx to latest 15 2023-02-28 19:42:51 +00:00
package-lock.json frontend: update surveys after backend schema changes 2023-03-23 09:35:10 +00:00
package.json frontend: setup buid validator executor 2023-03-22 20:53:53 +00:00
README.md frontend: Create a Cypress project for the EE Console 2023-02-07 16:16:20 +00:00
tailwind.config.js console: fix bugs for login and upgrade header style 2023-02-15 17:16:49 +00:00
tsconfig.base.json frontend: use relative paths instead of absolute within modules 2023-02-22 16:38:45 +00:00

Frontend

This project was generated using Nx.

Visit the Nx Documentation to learn more about it.

This frontend monorepo contains the Hasura Console, in all the possible modes.

Last import 2023-01-12

Nx Console

It's highly recommended to install the Nx Console for VSCode, IntelliJ or Neovim.

It will allow you to have all of the Nx commands usable via UI, have an embedded view of the NX graph right in your editor, and much more.

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

How to

Install the dependencies

Run npm install.

Development server

Run nx serve console-ce (requires an .env file) for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Build

Run nx build console-ce to build the project. The build artifacts will be stored in the dist/ directory.

Running unit tests

Run nx test console-ce to execute the unit tests via Jest.

Run nx affected:test to execute the unit tests affected by a change.

Running end-to-end tests

Run nx e2e console-ce-e2e --watch (requires an .env file) to open the Cypress UI and locally working with it.

Run nx e2e console-ce-e2e (requires an .env file) to execute the end-to-end tests via Cypress.

Run nx affected:e2e (requires an .env file) to execute the end-to-end tests affected by a change.

Understand your workspace

Run nx graph to see a diagram of the dependencies of your projects.