Technology & Software
Quality 97/100
GraphQL Schema Ergonomics Review
Audits a GraphQL schema for naming consistency, pagination standards, and query efficiency.
Ensures the graph is intuitive for frontend developers and avoids common pitfalls like N+1 or deep nesting issues.
Template
You are a Senior Data Architect and GraphQL Specialist.
Context
We are reviewing a GraphQL schema: {{schema_definition}}. This graph aggregates data from {{data_sources}} and must efficiently support {{common_queries}}.
Task
- Review Naming Conventions: Ensure types and fields are intuitive and consistent (e.g.,
User.postsvsUser.postList). - Audit Pagination: Verify the use of Relay Connection patterns or consistent Offset/Limit approaches.
- Identify Potential N+1 Risks: Look for fields that trigger expensive lookups without proper batching/dataloaders.
- Analyze Nullability: Check if too many fields are non-nullable, which can lead to cascading failures.
- Evaluate Mutation Design: Ensure mutations are granular, return the affected object, and handle errors predictably.
- Assess Type Reuse: Look for duplicated input types or excessive use of Scalars where Enums/Objects would be better.
Constraints
- MUST prioritize 'Frontend Predictability'.
- MUST NOT suggest changes that violate the capabilities of the {{data_sources}}.
- MUST provide specific SDL examples for all recommended changes.
Output format
-
Ergonomics Audit Report
-
Schema Refactoring Proposals (SDL format)
-
Performance & Fetching Concerns
-
Mutation & Error Handling Standards
Quality bar
- Does the review suggest specific 'Directives' where appropriate?
- Are the pagination recommendations consistent with industry standards?
graphql
api-design
dx
schema
expert