toolcacheAI Coding Prompts › GraphQL API Design Guide

GraphQL API Design Guide

Design a GraphQL API for [PROJECT].

Project: [WHAT THE APP DOES]
Entities: [MAIN DATA TYPES]
Frontend: [REACT / VUE / MOBILE / MULTIPLE CLIENTS]

Provide:
1. **Schema Design**: Type definitions for all entities and relationships
2. **Query Design**: Queries for fetching data with arguments and filtering
3. **Mutation Design**: Mutations for creating, updating, and deleting data
4. **Input Types**: Input type definitions for mutations
5. **Pagination**: Cursor-based vs offset pagination implementation
6. **Error Handling**: Custom error types and error formatting
7. **Authentication**: Auth context and resolver-level protection
8. **N+1 Prevention**: DataLoader pattern for efficient data fetching
9. **Subscriptions**: Real-time data with GraphQL subscriptions
10. **Code Generation**: Using codegen for type-safe client code
🔒

Unlock this prompt

You have 5 free unlocks remaining

or
Get unlimited access from £2.99 →

How to use this prompt

Copy the prompt above and paste it into ChatGPT, Claude, Gemini, or any AI assistant. Replace the bracketed placeholders with your specific details.

Leave a Review

Tried this prompt? Let us know how it worked — your reviews help other users find the best prompts.

Get Unlimited Access →Browse All 2,400 Prompts