Skip to content

feat: [TA-278] react-query 후속 — 상세 read 이관 + mutation invalidation - #155

Merged
seorinn merged 1 commit into
developfrom
TA-278-rq-followup-detail
Jun 30, 2026
Merged

seorinn merged 1 commit into
developfrom
TA-278-rq-followup-detail

Conversation

@seorinn

@seorinn seorinn commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

변경 사항

  • 상세 read 이관: EventDetail/PhotographerDetail을 useQuery(['promotion',id]/['photographer',id])로 → 재방문 캐시 즉시표시·dedupe. 잘못된 id→홈 이동·미fetch·빈화면 동작 유지
  • mutation invalidation(성공 시에만):
    • 저장/해제: PromotionBox·BottomBar → ['promotions']+['promotion',id] / PhotographerBox·PhotographerInfo → ['photographers']+['photographer',id]
    • 생성/수정: useEventForm → ['promotions'](+수정 시 ['promotion',id])
  • 테스트: useEventForm 래퍼 QueryClientProvider + 생성 시 무효화 검증 1건 추가

배경

TA-276은 list만 이관 → 상세는 매 진입 재fetch, 무효화 대상 없음. 상세를 캐시하고 저장/생성 후 관련 캐시를 무효화해 전 화면 일관성 확보.

검증

  • queryKey id는 양측 모두 number로 일치(무효화 실제 동작) / invalidate는 try 성공 후에만(실패 시 롤백만)
  • 자식 prop이 PromotionDetail/PhotographerDetail로 타입화돼도 깨짐 없음(tsc 통과)
  • tsc·전체 테스트(42 suites/181)·build 통과
  • Opus 리뷰: 머지 가능(number/string 불일치 없음 확인). 생성 무효화 테스트 보강 반영

후속(별도)

  • 저장 직후 setQueryData 직접 패치(재조회 1회 절감), MyPage 저장목록 이관, 상세 자식 any 타입 정리

Closes TA-278

@vercel

vercel Bot commented Jun 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
damaba Ready Ready Preview, Comment Jun 30, 2026 6:00am

@seorinn
seorinn marked this pull request as ready for review June 30, 2026 06:01
@seorinn
seorinn merged commit ddcb072 into develop Jun 30, 2026
3 checks passed
@seorinn
seorinn deleted the TA-278-rq-followup-detail branch June 30, 2026 06:01

This branch was successfully deployed

1 active deployment
Preview — 0ca8a261 Deployed Jun 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant