Conversation
관리자 FE가 알림 이력 '전체' 필터를 type: null, targetKind: null로 보내면 service가 null을 그대로 repository로 넘겨 Prisma where에 type: null이 들어가 500(Argument `type` must not be null). 매장·상품·배너 isActive(#434)에 이은 두 번째 같은 유형이라, 이번에는 admin Query 전수를 SDL에서 읽어 실제 앱으로 보내는 게이트로 막는다. - adminNotificationBroadcasts: type·targetKind를 ?? undefined로 정규화, DTO를 | null로 선언해 다음 누락은 tsc가 잡게 함 - 전수 점검: input 객체를 받는 admin Query 17개, nullable 입력 필드 70자리 - 고침 2(알림 이력 type·targetKind) - 그대로 둠 68: 페이지 limit·cursor 27, keyword trim 7, ID parseOptionalId 13, 기본값 false 불리언 4, 날짜 toDate 5, repository가 truthy·일치 비교로 거르는 enum 8, 명시적 null = 전체인 신고 status 1, 이미 정규화된 isActive 3 - 게이트 src/test/admin-query-null-inputs.spec.ts - nullable 필드 전부 null, input 인자 자체 null 두 경우를 main.ts와 같은 파이프·필터·가드·실DB로 보내 5xx·INTERNAL_ERROR 없음, 리졸버까지 닿아 data가 옴을 단언(17 + 16건) - 대상 수 17 고정, 입력 오류는 VALIDATION_FAILED(400)로 나가는지 대조, 판정기·입력 생성기 반증 - 반증 실측: 알림 정규화를 되돌리면 adminNotificationBroadcasts 1건만 실패(운영과 같은 Prisma 오류), isActive 3자리를 되돌리면 adminStores·adminProducts·adminBanners 3건 실패 - createTestingModuleWithRealDb가 PrismaService를 override해 AppModule 트리도 실DB 테스트 클라이언트를 쓰게 함 - 회귀: 알림 service spec·DTO spec에 null 필터 케이스 추가
- 전수 점검 중 발견: categories(input: { type: null })이 category_type: null을 Prisma에 넘겨 500(홈 칩·카테고리 진입 화면이 쓰는 조회)
- service ?? undefined 정규화 + DTO | null
- 회귀: type null이면 전체(수정 전 'category_type must not be null'로 실패 확인)
fix: 관리자 알림 이력·공개 카테고리의 null 필터 500 수정과 관리자 Query null 입력 게이트
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (9)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthrough알림 및 카테고리 조회에서 null 필터를 미지정 필터로 처리하도록 변경했습니다. 관리자 GraphQL 쿼리에 null 입력을 전달하는 실제 DB 통합 테스트와 테스트용 Prisma 서비스 재정의를 추가했습니다. Changesnullable 입력 처리
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to Null filters are handled as unfiltered queries, and no outstanding merge-blocking issue was identified. The PR is mergeable after normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The filter correction preserves existing access restrictions and does not expose more data than omitting the filters already did. Remaining uncertainty concerns test isolation and cleanup under interrupted or concurrent runs, rather than a demonstrated production security regression. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🧹 knip — dead-code 리포트전체 리포트
|
🩺 NestJS Doctor — 90/100 (Excellent)진단 470건 (error 12).
architecture / security 상위 항목
|
Coverage report
Test suite run success3723 tests passing in 355 suites. Report generated by 🧪jest coverage report action from 9c15e94 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
#484 릴리즈입니다. 운영 관리자 웹 '알림' 메뉴의 서버 오류와 구매자 앱 카테고리 조회의 같은 유형 500을 고칩니다. 마이그레이션은 없습니다.
type: null, targetKind: null)가 Prisma where에 null로 닿아 500 → null을 조건 없음으로 정규화categories(input: { type: null })의 같은 500 정규화(홈 칩·카테고리 진입 화면)머지 뒤 develop을 재생성합니다.
Summary by CodeRabbit
null을 전달하면 해당 필터를 적용하지 않고 전체 목록을 조회합니다.null로 전달하면 유형 제한 없이 전체 카테고리를 조회합니다.