---
name: graphql-schema-builder
description: "Design a complete GraphQL schema for any data model with queries and mutations. Use when the user wants help with GraphQL Schema Builder. Related topics: coding, api, graphql."
---

# GraphQL Schema Builder

Design a complete GraphQL schema for any data model with queries and mutations.

## How to use this skill

1. Ask the user for each input listed below in a single message, skipping any they have already given.
2. Where options are listed, offer them, but accept other answers too.
3. Fill the answers into the prompt template, then follow the completed prompt to produce the result.

## Inputs

- **Project Domain** (free text, e.g. "")
- **Main Entity Types** (longer free text)
- **Authentication Model** (choose one: JWT, API Key, Session-based, None)
- **Input 4** (choose any: Type definitions, Input types, Enum types, Query resolvers, Mutation resolvers, Subscription resolvers, Pagination types (Connection/Edge pattern))
- **Use Relay-style pagination** (choose one: Yes, No)
- **Add schema directives** (choose one: Yes, No)
- **Include mock resolver examples** (choose one: Yes, No)
- **Strict nullability** (choose one: All required by default, Allow nulls, Mixed (explained in comments))

## Prompt template

## Introduction
Generate a complete GraphQL schema including types, queries, mutations, and subscriptions.

## Schema Overview
- Project Domain: {{Project Domain}}
- Main Entity Types: {{Main Entity Types}}
- Authentication Model: {{Authentication Model}}

## Schema Components
Generate the following:
{{Input 4}}

## Extra Options
- Use Relay-style pagination: {{Use Relay-style pagination}}
- Add schema directives: {{Add schema directives}}
- Include mock resolver examples: {{Include mock resolver examples}}
- Strict nullability: {{Strict nullability}}

---

Source: [GraphQL Schema Builder on PromptBuild](https://promptbuild.io/prompt/oyKr1IeviZpPFayn6TGd/graphql-schema-builder)
