Skip to content

Commit f15186f

Browse files
authored
Apply suggestions from code review
1 parent 93ac2b2 commit f15186f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

website/pages/docs/type-generation.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ However, code-first development has tradeoffs:
4444

4545
- You won't get automatic type definitions for your resolvers unless you generate
4646
them manually or infer them through wrappers.
47-
- Schema documentation, testing, and tool compatibility may require you to export
48-
the schema to SDL first.
47+
- Schema documentation, testing, and tool compatibility may require you to provide
48+
a description of the schema in SDL first.
4949

5050
You can still use type generation tools like GraphQL Code Generator in a code-first setup.
5151
You just need to convert your schema into SDL.
5252

53-
To export your schema:
53+
To produce an SDL description of your schema:
5454

5555
```ts
5656
import { printSchema } from 'graphql';
@@ -60,13 +60,13 @@ import { writeFileSync } from 'fs';
6060
writeFileSync('./schema.graphql', printSchema(schema));
6161
```
6262

63-
Once you've written the SDL, you can treat the project like a schema-first project
63+
Once you've written the SDL, you can treat the project like an SDL-first project
6464
for type generation.
6565

6666
## Schema-first development
6767

6868
In a schema-first workflow, your GraphQL schema is written in SDL, for example, `.graphql`
69-
or `.gql` files. This serves as the source of truth for your server. This approach
69+
or `.gql` (discouraged) files. This serves as the source of truth for your server. This approach
7070
emphasizes clarity because your schema is defined independently from your business logic.
7171

7272
Schema-first development pairs well with type generation because the schema is
@@ -86,7 +86,7 @@ To get started, install the required packages:
8686
npm install graphql @graphql-codegen/cli @eddeee888/gcg-typescript-resolver-files
8787
```
8888

89-
This scoped package is publish by a community maintainer and is widely used for GraphQL server
89+
This scoped package is published by a community maintainer and is widely used for GraphQL server
9090
type generation.
9191

9292
We recommend using the [Server Preset](https://www.npmjs.com/package/@eddeee888/gcg-typescript-resolver-files) for a

0 commit comments

Comments
 (0)