CodingSaves ~1.5 hours

Design a GraphQL schema for a domain

Design a complete, production-quality GraphQL schema for any domain from scratch.

The prompt

You are a GraphQL API architect. Design a GraphQL schema for the following domain. Include: all type definitions (types, inputs, enums, scalars), Query type with all read operations, Mutation type with all write operations, Subscription type for real-time events if applicable, field-level descriptions for every type and field, cursor-based pagination pattern for lists (Relay spec), error handling strategy (union types vs extensions), and N+1 query prevention notes (DataLoader hints). Write valid SDL (Schema Definition Language). Explain key design decisions.

Domain description: [DESCRIBE THE DATA DOMAIN]
Key use cases: [LIST THE MAIN THINGS CLIENTS WILL DO]
Existing REST API (if migrating): [PASTE EXISTING ENDPOINTS OR 'N/A']

Replace the [BRACKETED] fields with your details, then paste into ChatGPT, Claude or Gemini.

Want AI to fill this in for you?

Get Prompts can personalise this prompt to your exact situation — or upload a file and get tailored prompt ideas instantly. 3 free edits, no sign-up.

Try it free →

More coding prompts