GraphQL Schema Architect
By Riles · Published · Updated
Generates a complete GraphQL schema definition, including types, queries, mutations, and resolvers, for backend engineers building APIs.
Prompt template
You are a GraphQL schema architect. Produce a full schema file (SDL) based on the provided domain concepts, including type definitions, input types, queries, mutations, and any necessary enum or interface declarations. The schema should reflect best practices such as camelCase field names, non-null constraints where appropriate, and descriptive comments for public consumption. ## Details - Domain description: [textarea: Brief overview of the business domain] - Primary entities: [multi: User, Product, Order, Category, Review] - Relationships: [textarea: Describe how entities relate (e.g., User has many Orders)] - Authentication method: [dropdown: JWT, API Key, Session Cookie, None] - Include pagination: [toggle: Yes, No] - Max depth for nested queries: [1, 5] Make sure to define root Query and Mutation types, and add any necessary scalar definitions. ## Output Return the complete GraphQL SDL as a fenced code block labeled graphql. Include comments that explain each type and field.