[Setting/#78] API 패키지화 및 React Query 팩토리 구조 설정#79
Merged
skyblue1232 merged 1 commit intodevelopfrom Mar 31, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (30)
📝 WalkthroughWalkthrough새로운 Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Interceptor as Request Interceptor
participant TokenStore as Token Store
participant API as API Server
participant RefreshHandler as Refresh Handler
Client->>Interceptor: 요청 (401 응답)
Interceptor->>TokenStore: getAccessToken()
TokenStore-->>Interceptor: access token
Interceptor->>Interceptor: isRefreshing 플래그 확인
alt 토큰 갱신 중이 아님
Interceptor->>Interceptor: isRefreshing = true
Interceptor->>RefreshHandler: refreshTokens(context)
RefreshHandler->>API: 토큰 갱신 요청
API-->>RefreshHandler: 새 토큰
RefreshHandler->>TokenStore: setTokens(newTokens)
TokenStore-->>RefreshHandler: ✓
Interceptor->>Interceptor: 대기 중인 요청 처리
Interceptor->>API: 원본 요청 재시도
API-->>Client: 성공 응답
else 토큰 갱신 중
Interceptor->>Interceptor: 대기 큐에 요청 추가
end
sequenceDiagram
participant Client
participant Mutation as useMutation
participant Handler as onSuccess Handler
participant CacheActions as Cache Actions
participant QueryClient as Query Client
Client->>Mutation: 뮤테이션 실행
Mutation->>Handler: onMutate 콜백
Mutation->>API: API 요청 전송
API-->>Mutation: 응답 수신
Mutation->>Handler: onSuccess(data, variables)
Handler->>CacheActions: getActions(data, variables)
CacheActions-->>Handler: 캐시 액션 배열
Handler->>CacheActions: runCacheActions 실행
loop 각 액션별
alt set 액션
CacheActions->>QueryClient: setQueryData(key, value)
else invalidate 액션
CacheActions->>QueryClient: invalidateQueries(key)
else remove 액션
CacheActions->>QueryClient: removeQueries(key)
end
end
QueryClient-->>Client: 캐시 업데이트 완료
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested labels
Poem
✨ Finishing Touches📝 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✅ 작업 내용
📝 Description
packages/api패키지 추가🚀 설계 의도 및 개선점
📸 스크린샷 (선택)
📎 기타 참고사항
packages/api의존성 및 workspace 연결 필요queryClient주입 방식으로 사용Fixes #78
Summary by CodeRabbit
릴리스 노트