6f5cf01f58
## Description This PR adds a hook to create REST endpoints for a particular table. It uses a different approach than the one used in the "Try it" feature: it uses the introspection schema query results to identify which GraphQL operations correspond to the particular rest operation we want to create. The matching is performed by looking at the comment in the graphql schema. This lets us to quickly identify the correct GraphQL operation even in the presence of schema customizations, but, on the other end, it could not work if the user disabled or changed the default comment in the schema. We evaluated that, since this is a "quick start" feature, the pros outcomes the cons. ## How to test it - Run Storybook - Go to the `useCreateQueryCollection ` story - Click "Create Rest endpoint" - look at the network tab and the changes in the metadata displayed PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9464 GitOrigin-RevId: fc0d5f26d656a5e7f2c83ecda10703b851a88626 |
||
---|---|---|
.. | ||
.husky | ||
.storybook | ||
.vscode | ||
.yarn/releases | ||
apps | ||
docker | ||
docs | ||
libs | ||
static | ||
tools | ||
types | ||
.build.env | ||
.editorconfig | ||
.eslintignore | ||
.eslintrc.json | ||
.gitattributes | ||
.gitignore | ||
.lintstagedrc.mjs | ||
.npmrc | ||
.nvmrc | ||
.prettierignore | ||
.prettierrc | ||
.yarnrc.yml | ||
babel.config.json | ||
control-plane-graphql-codegen.yml | ||
custom-webpack.config.js | ||
frontend.code-workspace | ||
jest.config.ts | ||
jest.preset.js | ||
nx.json | ||
package.json | ||
README.md | ||
snapshots.js | ||
tailwind.config.js | ||
tsconfig.base.json | ||
yarn.lock |
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
- Generic info
- Coming from the previous codebase
- Development Tooling
- Design System's Storybook
- Cypress Dashboard
- Cypress README
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.