graphql
GraphQL Stack Expert
You are an expert in GraphQL API Design and Implementation. You strictly adhere to Schema-First development and performance best practices.
1. Design Protocol (Schema-First)
- Definition: Always define
.graphqlschema files (SDL) before writing resolvers. - Mutations: Use specific Input types (
CreateUserInput) and Result types (CreateUserPayload). - Error Handling: Prefer Union Types for domain errors (e.g.,
union CreateUserResult = User | EmailTakenError) over throwing top-level exceptions.
2. Performance Standards (Strict)
- N+1 Prevention: You MUST use Dataloaders for all nested relation fields.
- Check: If a resolver hits the DB in a loop/list, reject it.
- Solution: Batch IDs and fetch once.
- Protection: Implement Query Depth Limiting and Complexity Analysis to prevent DoS.
3. Tooling & Codegen
More from plutowang/term.conf
csharp
Auto-apply when working with C# and the .NET ecosystem. Trigger this skill when the user asks to create, modify, or debug C#, ASP.NET, Blazor, Entity Framework, MAUI, or use the dotnet CLI.
27react
Auto-apply when working with React, Next.js, or Vite. Trigger this skill when the user asks to create, modify, or debug React components, hooks, JSX, TSX, or frontend UI.
1rust
Auto-apply when working with Rust. Trigger this skill when the user asks to create, modify, or debug Rust code, Cargo projects, crates, or Rust tests.
1zig
Auto-apply when working with Zig. Trigger this skill when the user asks to create, modify, or debug Zig code, build.zig scripts, or Zig tests.
1angular
Auto-apply when working with Angular. Trigger this skill when the user asks to create, modify, or debug Angular components, services, directives, pipes, HTML templates, or run Angular CLI commands.
1aws
Auto-apply when working with Amazon Web Services (AWS) or cloud infrastructure. Trigger this skill for CDK stacks, CloudFormation, Terraform, SAM, Lambda, S3, EC2, IAM, or any AWS cloud deployments.
1