[공통] 분실물, 공지사항, 콜밴, 동아리 도메인 적용#1206
Merged
ff1451 merged 17 commits intorefactor/#1200/querykey-options-factoryfrom Mar 16, 2026
Merged
[공통] 분실물, 공지사항, 콜밴, 동아리 도메인 적용#1206ff1451 merged 17 commits intorefactor/#1200/querykey-options-factoryfrom
ff1451 merged 17 commits intorefactor/#1200/querykey-options-factoryfrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 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 |
f51024e
into
refactor/#1200/querykey-options-factory
2 checks passed
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.
Changes 📝
분실물, 공지사항, 콜밴, 동아리 도메인에 queryKey Factory, queryOptions Factory 적용
작업 기준
기본적인 토대는 TkDodo의 글을 보고 작업했습니다.
공통 read 설정은
src/api/<domain>/queries.ts로 이동했습니다.공통 write 설정은
src/api/<domain>/mutations.ts로 이동했습니다.queryKey만 분리하지 않고,queryOptions/mutationOptions단위로 공유하도록 맞췄습니다.SSR
prefetchQuery/fetchQuery와 클라이언트useQuery/useSuspenseQuery가 같은 query factory를 사용하도록 정리했습니다.mutationFn + 공통 invalidate는 factory로 올리고, 토스트/라우팅/모달 닫기 같은 화면 전용 후처리는 hook 또는 호출부에 남겼습니다.UseQueryOptions/UseMutationOptions를 그대로 forwarding하는 저수준 wrapper는 만들지 않았습니다.단일 query/mutation만 감싸는 thin hook은 제거하거나 직접 호출로 대체했습니다.
여러 query/mutation 조합, 라우팅, local state, polling, storage, domain action을 다루는 workflow hook은 유지했습니다.
기존 동작 보존을 우선으로 했고, API 스펙이나 사용자 플로우 자체는 바꾸지 않았습니다.
의도적으로 남겨둔 것
아래 성격의 hook은 유지했습니다.
select/ 가공 / fallback 책임이 있는 facade hookPrecaution
✔️ Please check if the PR fulfills these requirements
developbranch unconditionally?main?yarn lint