graphql-patternslisted
Install: claude install-skill ajyadav013/claude-kit
# GraphQL Patterns
Tactical GraphQL patterns for Strawberry (backend) and Apollo Client (frontend) from production services.
## When to use
- Implementing GraphQL filter/dropdown endpoints alongside REST APIs in FastAPI
- Setting up Apollo Client with JWT auth, org context headers, and error handling
- Writing hand-typed GraphQL queries/mutations without codegen
- Mounting multiple narrow-scope GraphQL schemas for specific use cases (filters, dashboards)
- Understanding where GraphQL is used in the codebase (limited footprint: filter API services, dashboard applications)
**NOTE**: This is a tactical pattern used in ~2 applications. It is **not** the organizational default — most services use pure REST. Use this skill when working on or extending these specific GraphQL-enabled apps.
## Core conventions
### Backend: Strawberry GraphQL with FastAPI
**Schema-per-endpoint pattern**: Define one `strawberry.Schema` per query type (e.g., `product_schema`, `category_schema`, `region_schema`, `supplier_region_schema`, `format_schema`), then mount each schema to its own GraphQL router under a shared prefix. The reference service has 11 schemas total for filters: product, all_product, category, all_category, region, all_region, supplier_region, all_supplier_region, format, all_format, approval_stage. _(filter API service)_
**Narrow query classes**: Use `@strawberry.type` decorated classes with single-purpose `@strawberry.field` methods. Each query returns `List[Optional[str]]` or