원클릭으로
planforge-new-graphql-resolver
Scaffold a Hot Chocolate GraphQL resolver with query, mutation, subscription, and DataLoader patterns.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Scaffold a Hot Chocolate GraphQL resolver with query, mutation, subscription, and DataLoader patterns.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Run a comprehensive code review across architecture, security, testing, naming, and patterns. Invokes relevant reviewer agents in sequence. Use before merging features or at the end of a phase. With --quorum, dispatches multi-model analysis for higher confidence.
Audit UI components for WCAG 2.2 compliance, semantic HTML, ARIA labels, keyboard navigation, color contrast, and responsive design.
Audit API endpoints for backward compatibility, versioning, OpenAPI compliance, pagination, rate limiting, and RFC 9457 error responses.
Review code for architecture violations: layer separation, sync-over-async, missing CancellationToken, improper DI. Use for PR reviews or code audits.
Fix a bug using TDD: reproduce with a failing test first, then implement the fix, then verify. Prevents regressions.
Review CI/CD pipelines for best practices: environment promotion, secrets management, rollback strategies, build caching, and deployment safety.
| name | planforge-new-graphql-resolver |
| description | Scaffold a Hot Chocolate GraphQL resolver with query, mutation, subscription, and DataLoader patterns. |
| metadata | {"author":"plan-forge","source":".github/prompts/new-graphql-resolver.prompt.md"} |
Scaffold a GraphQL resolver using Hot Chocolate with query, mutation, and DataLoader patterns.
[QueryType]
public class {EntityName}Queries
{
[UseProjection]
[UseFiltering]
[UseSorting]
public IQueryable<{EntityName}> Get{EntityName}s(
[Service] I{EntityName}Repository repository)
{
return repository.GetAll();
}
public async Task<{EntityName}?> Get{EntityName}ById(
Guid id,
[Service] I{EntityName}Repository repository,
CancellationToken ct)
{
return await repository.GetByIdAsync(id, ct);
}
}
[MutationType]
public class {EntityName}Mutations
{
public async Task<{EntityName}> Create{EntityName}(
Create{EntityName}Input input,
[Service] I{EntityName}Service service,
CancellationToken ct)
{
return await service.CreateAsync(input, ct);
}
public async Task<{EntityName}> Update{EntityName}(
Guid id,
Update{EntityName}Input input,
[Service] I{EntityName}Service service,
CancellationToken ct)
{
return await service.UpdateAsync(id, input, ct);
}
}
public record Create{EntityName}Input(
[property: MaxLength(200)] string Name,
string? Description);
public record Update{EntityName}Input(
[property: MaxLength(200)] string Name,
string? Description);
public class {EntityName}ByIdDataLoader : BatchDataLoader<Guid, {EntityName}>
{
private readonly I{EntityName}Repository _repository;
public {EntityName}ByIdDataLoader(
I{EntityName}Repository repository,
IBatchScheduler scheduler)
: base(scheduler)
{
_repository = repository;
}
protected override async Task<IReadOnlyDictionary<Guid, {EntityName}>> LoadBatchAsync(
IReadOnlyList<Guid> keys, CancellationToken ct)
{
var items = await _repository.GetByIdsAsync(keys, ct);
return items.ToDictionary(x => x.Id);
}
}
// Usage in a type extension
[ExtendObjectType(typeof(Order))]
public class OrderTypeExtension
{
public async Task<{EntityName}?> Get{EntityName}(
[Parent] Order order,
{EntityName}ByIdDataLoader loader,
CancellationToken ct)
{
return await loader.LoadAsync(order.{EntityName}Id, ct);
}
}
builder.Services
.AddGraphQLServer()
.AddQueryType()
.AddMutationType()
.AddTypeExtension<OrderTypeExtension>()
.AddDataLoader<{EntityName}ByIdDataLoader>()
.AddFiltering()
.AddSorting()
.AddProjections();
CancellationToken on all async resolver methods[UseProjection] to push field selection down to the databaseGraphQL/ folder organized by entity