home/roleplay/graphql-instructions

Graphql.instructions

GPTClaudeGemini··537 copies·updated 2026-07-14
graphql-instructions.prompt
---
applyTo: "**/GraphQL/**/*.cs"
---

# GraphQL Layer Rules

These rules apply exclusively to the `GraphQL` project layer.

## Layer Separation
- **Zero business logic** — resolvers delegate to `Core` services
- HotChocolate packages (`HotChocolate.*`) belong in this layer only — never reference them from `Core`, `DataAccess`, or `Worker`
- Input/Output types are defined here, separate from domain entities in `Abstractions`

## Implementation-First Approach
- Use annotation-based (implementation-first) type definitions — not schema-first SDL
- Leverage HotChocolate's built-in mutation conventions (`[UseMutationConvention]` + `[Error<T>]`) for consistent error handling

## Attribute Stacking Order
When combining data attributes on a resolver, stack in this exact order (top to bottom):

when to use it

Community prompt sourced from the open-source GitHub repo AndreasKarz/Vibe-Coding-Dev-Setup (NOASSERTION). A "Graphql.instructions" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.

tags

roleplaycommunitygeneral

source

AndreasKarz/Vibe-Coding-Dev-Setup · NOASSERTION