Skip to content

Commit c291ec4

Browse files
Merge pull request #1323 from mattleff/patch-1
feat(): Add sortSchema property
2 parents 6b5aac4 + 308d9a4 commit c291ec4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

content/graphql/quick-start.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,15 @@ GraphQLModule.forRoot({
101101
}),
102102
```
103103

104+
By default, the types in the generated schema will be in the order they are defined in the included modules. To sort the schema lexicographically, set the `sortSchema` property to `true`:
105+
106+
```typescript
107+
GraphQLModule.forRoot({
108+
autoSchemaFile: join(process.cwd(), 'src/schema.gql'),
109+
sortSchema: true,
110+
}),
111+
```
112+
104113
A fully working code first sample is available [here](https://github.com/nestjs/nest/tree/master/sample/23-graphql-code-first).
105114

106115
#### Schema first

0 commit comments

Comments
 (0)