⚙️
GraphQL Schema from Requirements
Generate a complete GraphQL schema with resolvers from business requirements
prompt template
Design a GraphQL schema for this application: **Domain:** [DOMAIN_DESCRIPTION — e.g., "project management tool with teams, projects, tasks, and comments"] **Key operations:** [OPERATIONS — e.g., "CRUD for all entities, assign tasks, filter by status"] Generate: 1. **Type definitions** — all GraphQL types with field descriptions 2. **Query root** — all queries with arguments and return types 3. **Mutation root** — all mutations with input types and responses 4. **Subscription root** — real-time subscriptions for relevant changes 5. **Connection pattern** — cursor-based pagination for lists 6. **Error handling** — union types for expected errors vs exceptions 7. **Authorization directives** — @auth, @hasRole for field-level access control 8. **N+1 prevention** — DataLoader patterns for nested resolvers Output the complete .graphql schema file and resolver structure.
How to Use This Prompt
- 1Copy the prompt template above
- 2Paste into Claude, ChatGPT, or Cursor
- 3Replace [bracketed placeholders] with your specific project details
- 4Iterate on the AI output to refine and customize the results
More Backend Prompts
Related backend templates from the vault
⚙️
Rate-Limited API with Token Bucket
Use this prompt to rate-limited api with token bucket with AI assistance
Beginnerrate-limitingtoken-bucket
⚙️
Database Transaction Manager
Use this prompt to database transaction manager with AI assistance
Intermediatetransactionsdatabase
⚙️
REST API Endpoint Generator
Generate a complete CRUD API endpoint with validation and error handling
Beginnerapirest
⚙️
Distributed Transaction Saga Implementation
PROImplement a saga pattern for distributed transactions with compensation logic and failure recovery
Advancedbackendsaga-pattern
You Might Also Like
Prompts from other categories that share similar tags
🔌
API DesignPRO
Webhook System Designer
Design and implement a webhook delivery system
Shared:backend
🧪
TestingPRO
Contract Testing Setup
Set up contract tests between API producer and consumer services
Shared:api
🧪
Testing
Load Testing Script Generator
Generate load test scripts to validate API performance under stress
Shared:api
🗄️
Database
Database Schema Designer
Design a normalized database schema from application requirements
Shared:schema-design
Keep Exploring the Vault