Declarative .mdcCursor/Claude/Windsurf 규칙 및 n8n 워크플로IDE 규칙제로 비밀 유출 감사

GraphQL 스키마 보안, 쿼리 깊이 제한 및 제로 N+1 규칙

DataLoader 일괄 처리, 제한된 페이지 매김 제한, 쿼리 복잡성 한도 및 Null이 아닌 스키마 진화를 적용하는 선언적 .mdc 및 CLAUDE.md 규칙 세트입니다.

선언적 에이전트 및 IDE 규칙 파일

---
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.