graphql-engine/frontend/libs
Daniele Cammareri 6f5cf01f58 chore: add useCreateRestEndpoints hook
## 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
2023-06-15 11:01:14 +00:00
..
console chore: add useCreateRestEndpoints hook 2023-06-15 11:01:14 +00:00
nx console: fix storybook lagging promises 2023-05-24 09:57:29 +00:00
open-api-to-graphql console: open api to graphql library 2023-06-13 19:58:02 +00:00
.gitkeep frontend: initial nx generation 2022-08-05 18:53:54 +00:00