Skip to content

Commit

Permalink
chore: update README docs on how to generate schema
Browse files Browse the repository at this point in the history
Add extra dependency information and fix code by adding missing argument
  • Loading branch information
dariuszkuc committed Nov 6, 2023
1 parent a18d8db commit ca62c6c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ Entity resolution
#### Generating schema at build time

See [HotChocolate documentation](https://chillicream.com/docs/hotchocolate/v13/server/command-line) for details on the server support for command line interface.
In order to generate schema at build time, you need to add additional dependency on `HotChocolate.AspNetCore.CommandLine` package and configure your server to allow it
to `RunWithGraphQLCommands`.

```csharp
var builder = WebApplication.CreateBuilder(args);
Expand All @@ -220,7 +222,7 @@ builder.Services

var app = builder.Build();
app.MapGraphQL();
app.RunWithGraphQLCommands();
app.RunWithGraphQLCommands(args);
```

You can then generate your schema by running
Expand Down Expand Up @@ -553,4 +555,4 @@ For more info on how to contact the team for security issues, see our [Security

## License

This library is licensed under [The MIT License (MIT)](LICENSE).
This library is licensed under [The MIT License (MIT)](LICENSE).

0 comments on commit ca62c6c

Please sign in to comment.