Declarative .mdcCursor/Claude/Windsurf Kuralları ve n8n İş AkışlarıIDE KuralıSıfır-Sır Sızıntı Denetimli

GraphQL Şema Güvenliği, Sorgu Derinliği Sınırları ve Sıfır N+1 Kuralı

DataLoader toplu işlemlerini, sınırlı sayfalandırma sınırlarını, sorgu karmaşıklığı tavanlarını ve boş olmayan şema gelişimini zorunlu kılan bildirim temelli .mdc ve CLAUDE.md kural kümesi.

Bildirimsel Ajan ve IDE Kural Dosyaları

---
description: Prevent GraphQL N+1 queries, unbounded list fetches, and breaking schema removals
globs: **/*.{graphql,graphqls,gql,go,ts}
alwaysApply: false
---

# GraphQL Zero N+1 & Query Hardening Rules

- Enforce a hard server-side maximum ceiling (e.g. `maxLimit = 1000`) on every GraphQL list query regardless of client-supplied `limit` arguments.
- Eliminate per-row SQL queries inside nested field resolvers using single-roundtrip SQL joins/JSONB aggregation or request-scoped DataLoaders.
- Restrict nested query depth (`<= 8`) and reject oversized POST bodies (`> 256 KB`) at the HTTP handler layer.
- Evolve GraphQL schemas additively: mark superseded fields `@deprecated(reason: "...")` instead of deleting or narrowing field types.
- Sanitize resolver errors before returning GraphQL `errors[]` so internal SQL DSNs and stack traces are never leaked to clients.

## Verification Check
```bash
grep -rn 'SELECT ' graph/ && echo 'Move raw SQL into internal/db batch methods'
```

Topluluk Kurulum Notları ve Üretim Yorumları (0)

Henüz topluluk notu yok. İlk üretim yapılandırma ipucunu aşağıda paylaşın.

Kurulum Notu veya Doğrulama İpucu Paylaş

Sunulan MCP Araçları ve Kaynak Şeması Denetçisi

Araç / Kaynak KimliğiGirdi ParametreleriÇalışma Davranışı
bounded_list_pagination**/*.graphqlsRequires explicit limit ceilings and batched relation loading on all list fields.