"HotChocolate GraphQL 14+ code-first layer beside the REST controllers: QueryType/MutationType, DataLoaders, filtering/sorting, query-cost guard. Resolvers delegate to Griot.Application."
Install
npx skillscat add donartkins/griot/hotchocolate-graphql Install via the SkillsCat registry.
SKILL.md
HotChocolate GraphQL Skill
Setup
dotnet add src/Griot.Api package HotChocolate.AspNetCore HotChocolate.AspNetCore.AuthorizationProgram.cs: AddGraphQLServer().AddQueryType<GriotQuery>().AddMutationType<GriotMutation>().AddDataLoader().AddFiltering().AddSorting(); map /graphql.
Rules
- Code-first: C# types are the contract (shared with Domain/DTOs). No SDL-first.
- Resolvers delegate to services — zero business logic in resolvers.
DataLoader<,>for assignees + comments (N+1 prevention).- Same JWT principal as REST; query-cost guard on
/graphql. - Type names mirror the ERD entity names exactly (contract sync across systems).
Verify
- Schema at
/graphql?sdl; dashboard/board queries show no N+1 in tests/logs.