Skip to content

Commit

Permalink
Chore: Update README for metadata generation util
Browse files Browse the repository at this point in the history
Updates README to be in line with recent changes.
  • Loading branch information
robertjdominguez committed Oct 17, 2024
1 parent 8790e8d commit fc8640a
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions utilities/generate-metadata-docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

## Overview

This utility will automatically generate a reference doc for Hasura Metadata using a provided
`supergraph_or_subgraph_object.jsonschema`. If examples are provided in the schema, they're transformed into YAML for
docs using `js-yaml`.
This utility will automatically generate a reference doc for Hasura Metadata using a provided set of JSON schemas. If
examples are provided in the schema, they're transformed into YAML for docs using `js-yaml`.

## Usage

Expand All @@ -17,21 +16,19 @@ cd utilities/generate-metadata-docs
npm i
```

Assuming you have a `supergraph_or_subgraph_object.jsonschema` living in `/schema_examples`, you can run the following
to generate a new `metadata-reference.mdx` file that will override the existing one in `docs/supergraph-modeling`:
Assuming you have the appropriate files (`hasura_yaml_schema_resolved.json`, `hml_schema_resolved.json`,
`yaml_schema_resolved.json`) living in root of this utility, you can run the following to regenerate the metadata
reference pages in Supergraph Modeling:

```bash
npm run build
npm run start
```

## Contributing

There are tests. Use them! You can use Jest's watch mode for testing by running:
> [!TIP] CI takes care of updating these files **whenever** the golden files are updated in the engine; these then
> trickle their way down via LSP to the CLI and Docs 🚀
```bash
npm run test
```
## Contributing

If you're more eager to develop with watch mode, and don't like tests (shame on you), run the following:

Expand Down

0 comments on commit fc8640a

Please sign in to comment.