CleanGraphQLApi.Template 2026.11.1.140

Prefix Reserved
dotnet new install CleanGraphQLApi.Template@2026.11.1.140
                    
This package contains a .NET Template Package you can call from the shell/command line.

Clean GraphQL API

A dotnet new template for a GraphQL API built with a streamlined version of Clean Architecture and Hot Chocolate.

It's one of five Lean Mean Clean Apps templates, for Minimal APIs, Model Context Protocol, GraphQL, Web API controllers and AWS Lambda, that share the same Application and Infrastructure layers, tests and CI pipeline. Full docs live at leanmeancleanapps.github.io/graphql.

Requirements

Install

dotnet new install CleanGraphQLApi.Template

Create a solution

dotnet new cleangraphqlapi --name {YOUR_SOLUTION_NAMESPACE} --authorName "{YOUR_NAME}"
Option Description
--name The name of the solution, also used as the root namespace.
--authorName The name of the author of the solution.
--authority The OAuth authorization server that issues access tokens. Leave it empty to run the API without authentication.
--audience The audience access tokens must be issued for, usually the API's own URL.

With an authority set, the movie, author and review queries and the review mutations need a JWT bearer token, and the version query, the schema and Nitro stay open.

Run it

From the new solution's folder, start the app and a Seq container for logs.

docker compose up -d

Then open Nitro, the GraphQL IDE, at http://localhost:8080/graphql. Seq shows the logs at http://localhost:5341.

Or run it without Docker.

dotnet run --project ./src/Presentation

Run the tests with dotnet test. Every way to run the solution is in docs/RUN.md inside it.

What's inside

  • Presentation: A Hot Chocolate GraphQL schema with Relay paging, DataLoaders and the Nitro IDE
  • Application: commands and queries through Mediator, validation with FluentValidation and mapping with Mapperly
  • Infrastructure: Entity Framework Core on SQLite with migrations and optional sample data
  • Tests: xUnit, Shouldly and NSubstitute, each test on its own in-memory database
  • A Dockerfile that runs as a non-root user, a docker-compose.yml, and a GitHub Actions pipeline with tests, a coverage gate, a container scan and CodeQL

Updates

A new version is released on the 1st of each month with every change merged since the previous release, as long as something has changed. No change, no new version number. We're not here to pad the download stats. To update an installed template:

dotnet new update

What changed in each version is in the release notes. To remove the template, run dotnet new uninstall CleanGraphQLApi.Template.

More help

Support

If this template saves you time, please consider sponsoring the work on GitHub. It keeps all five templates current, and the coffee flowing.

  • net10.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2026.11.1.140 115 11/1/2026
2026.10.29.116 122 10/29/2026
2026.10.28.109 111 10/28/2026
2026.10.28.107 105 10/28/2026
2026.10.28.104 101 10/28/2026
2026.10.28.100 95 10/28/2026
2026.10.28.98 104 10/28/2026
2026.10.28.93 109 10/28/2026
2026.10.28.91 106 10/28/2026
2026.10.27.89 118 10/28/2026
2022.7.4.52 1,356 7/4/2022
2022.7.4.51 1,165 7/4/2022
2022.7.4.50 1,108 7/4/2022
2022.7.4.49 1,101 7/4/2022
2022.7.4.48 1,105 7/4/2022
2022.7.4.47 1,145 7/4/2022
2022.7.4.46 1,091 7/4/2022
2022.7.2.45 1,138 7/2/2022
2022.3.13.44 1,240 3/13/2022
2022.2.27.43 1,186 2/27/2022
Loading failed