feat: storeReviews 사진후기 필터(photoOnly)·photoTotalCount 추가 - #171
Conversation
매장 사진후기 화면(FE 요청)을 위해 productReviews와 동일 의미론으로 StoreReviewsInput.photoOnly(기본 false), StoreReviewConnection.photoTotalCount를 추가한다. photoTotalCount는 필터와 무관하게 항상 사진 리뷰 총수. repository는 product 쪽 publicReviewWhere 패턴을 미러링해 활성 미디어 존재(media.some, soft-delete 제외) 기준으로 필터·카운트한다.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 — 89/100 (Good)진단 270건 (error 0).
architecture / security 상위 항목
|
Coverage report
Test suite run success1466 tests passing in 173 suites. Report generated by 🧪jest coverage report action from 5f29ec1 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
FE 요청 반영: 매장 사진후기 화면을 위해
storeReviews에 사진 필터·카운트를 추가한다.productReviews에는 이미 있는 기능으로, 동일 의미론을 미러링한다.StoreReviewsInput.photoOnly: Boolean = false— true면 활성 미디어가 있는 리뷰만 조회StoreReviewConnection.photoTotalCount: Int!— 사진 리뷰 총수. 필터와 무관하게 항상 반환 (productReviews.photoTotalCount와 동일 의미)배경: 서버 필터 없이 FE가 최신 N건에서 사진 리뷰를 골라내면, 사진 없는 리뷰가 몰린 구간에서 사진후기 그리드가 빈 화면이 되는 문제가 있었다.
Scope
store-reviews.graphql— SDL 필드 2개 추가 (additive, 기존 호출 breaking 없음)store-reviews.input.ts—photoOnly검증 데코레이터 추가store-review.repository.ts— product 쪽publicReviewWhere패턴 미러링:media.some(deleted_at: null)필터,countStoreReviews를{ storeId, photoOnly }시그니처로 변경store-review.service.ts— 목록 + 전체/사진 카운트 병렬 조회store-review-output.type.ts—photoTotalCount추가진행 상황
yarn dto:check통과yarn validate통과Impact
storeReviews(photoOnly: true)+ 헤더 카운트photoTotalCount로 시안 구현 가능.Test plan
photoOnly=true면 활성 미디어 있는 리뷰만 반환,totalCount(전체)/photoTotalCount(사진) 분리 검증photoTotalCount값 검증photoOnly입력이 service까지 전달,photoTotalCount반환 경로 검증