Declarative .mdcCursor/Claude/Windsurf नियम और n8n वर्कफ़्लोज़आईडीई नियमजीरो-सीक्रेट लीक का ऑडिट किया गया

GraphQL स्कीमा सुरक्षा, क्वेरी गहराई सीमाएँ और शून्य N+1 नियम

घोषणात्मक .mdc और CLAUDE.md नियम सेट डेटालोडर बैचिंग, बाउंड पेजिनेशन सीमाएं, क्वेरी जटिलता छत और गैर-शून्य स्कीमा विकास को लागू करते हैं।

घोषणात्मक एजेंट और आईडीई नियम फ़ाइलें

---
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'
```

सामुदायिक सेटअप नोट्स और उत्पादन समीक्षाएँ (0)

अभी तक कोई सामुदायिक नोट नहीं. नीचे अपना उत्पादन कॉन्फ़िगरेशन टिप साझा करें।

एक सेटअप नोट या सत्यापन टिप पोस्ट करें

एक्सपोज़्ड MCP टूल्स और रिसोर्स स्कीमा इंस्पेक्टर

उपकरण/संसाधन पहचानकर्ताइनपुट पैरामीटर्सनिष्पादन व्यवहार
bounded_list_pagination**/*.graphqlsRequires explicit limit ceilings and batched relation loading on all list fields.