Skip to content

Commit

Permalink
chore(docs): document graphql-codegen script (#1213)
Browse files Browse the repository at this point in the history
* chore(docs): document graphql-codegen script

* chore(docs): reference codegen.yml
  • Loading branch information
wilsonianb authored Mar 14, 2023
1 parent 8c0967b commit 80071d3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,20 @@ Eslint config should not be overridden in any packages.

Prettier config should not be overridden in any packages.

#### GraphQL type generation

[GraphQL Code Generator](https://the-guild.dev/graphql/codegen) is used for generating TypeScript types from `schema.graphql` files.

```shell
./<package>/codegen.yml # GraphQL Code Generator config
```

The `generate` script should be run if a package's `schema.graphql` file is modified.

```shell
pnpm --filter <package> generate
```

#### Testing

[Jest](https://jestjs.io/) is used for testing.
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ pnpm -r build
# build specific package (e.g. backend):
pnpm --filter backend build

# generate types from specific package GraphQL schema:
pnpm --filter backend generate

# run individual tests (e.g. backend)
pnpm --filter backend test

Expand Down

0 comments on commit 80071d3

Please sign in to comment.