Skip to content

refactor: 각 도메인별 쿼리키 분리#330

Merged
aabyess merged 8 commits into
developfrom
#329-refactor-querykeys
Apr 17, 2026
Merged

refactor: 각 도메인별 쿼리키 분리#330
aabyess merged 8 commits into
developfrom
#329-refactor-querykeys

Conversation

@doxmt
Copy link
Copy Markdown
Collaborator

@doxmt doxmt commented Apr 16, 2026

🛠️ 설명 (Description)

features/<도메인> 경로에서 관리하던 queryKeys를
features/shared/queryKeys 폴더에 쿼리키파일을 생성하여 관리합니다

🔗 관련 이슈 (Related Issues)

☑️ 체크리스트 (Checklist)

  • 코드가 프로젝트 코딩 컨벤션을 따릅니다.
  • 테스트 코드가 작성되었고, 통과했습니다.
  • 변경 사항에 대한 문서화가 완료되었습니다.
  • 필요한 경우, 다른 팀원에게 리뷰를 요청했습니다.
  • CI/CD 파이프라인이 성공했습니다.

@doxmt doxmt self-assigned this Apr 16, 2026
@doxmt doxmt added the refactor 코드 리팩토링 / 코드 수정 label Apr 16, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request centralizes authentication-related React Query keys by introducing a shared authQueryKeys constant, replacing hardcoded strings across the application. The review feedback suggests restructuring these keys into a hierarchical domain-based format for better scalability and using path aliases for imports to ensure consistency with the project's coding standards.

Comment on lines +1 to +5
const AUTH_QUERY_BASE_KEY = ["me"] as const;

export const authQueryKeys = {
me: AUTH_QUERY_BASE_KEY,
} as const;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

쿼리 키를 관리할 때 도메인(예: auth)을 베이스 키로 사용하고, 세부 항목을 하위 계층으로 구성하는 것이 확장성과 가독성 측면에서 좋습니다. 현재 AUTH_QUERY_BASE_KEY["me"]로 되어 있는데, 이를 ["auth"]로 변경하고 me 키를 ["auth", "me"]와 같이 구성하는 것을 권장합니다. 또한, 현재 구조에서 AUTH_QUERY_BASE_KEY 상수는 authQueryKeys 객체 내부에서 직접 정의해도 충분하므로 중복을 줄일 수 있습니다. (참고: 이 변경은 기존 브라우저 캐시 키를 변경하므로 배포 시 유의가 필요합니다.)

export const authQueryKeys = {
	all: ["auth"] as const,
	me: ["auth", "me"] as const,
} as const;

Comment thread features/auth/mutations.ts Outdated
Comment thread features/auth/queries.ts Outdated
@github-actions
Copy link
Copy Markdown

🧷 Preview: https://reboot-gbunpuji3-code-base.vercel.app
⏰ 배포 시각: 2026년 04월 16일 14시 09분

@github-actions
Copy link
Copy Markdown

🧷 Preview: https://reboot-alnutq6p4-code-base.vercel.app
⏰ 배포 시각: 2026년 04월 16일 14시 14분

@Geunone2 Geunone2 self-assigned this Apr 16, 2026
@github-actions
Copy link
Copy Markdown

🧷 Preview: https://reboot-8i5l8qw7k-code-base.vercel.app
⏰ 배포 시각: 2026년 04월 16일 14시 38분

@github-actions
Copy link
Copy Markdown

🧷 Preview: https://reboot-csl9tyfip-code-base.vercel.app
⏰ 배포 시각: 2026년 04월 16일 15시 10분

@sohyun0 sohyun0 self-assigned this Apr 16, 2026
@github-actions
Copy link
Copy Markdown

🧷 Preview: https://reboot-ms9xezw1w-code-base.vercel.app
⏰ 배포 시각: 2026년 04월 17일 10시 04분

@sohyun0 sohyun0 changed the title refactor: auth 쿼리키 분리 refactor: 각 도메인별 쿼리키 분리 Apr 17, 2026
@github-actions
Copy link
Copy Markdown

🧷 Preview: https://reboot-e6cgvqgds-code-base.vercel.app
⏰ 배포 시각: 2026년 04월 17일 10시 41분

@github-actions
Copy link
Copy Markdown

🧷 Preview: https://reboot-gxif5vc6o-code-base.vercel.app
⏰ 배포 시각: 2026년 04월 17일 13시 09분

@aabyess aabyess merged commit 7a0a7d5 into develop Apr 17, 2026
1 check passed
@aabyess aabyess deleted the #329-refactor-querykeys branch April 17, 2026 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor 코드 리팩토링 / 코드 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REFACTOR] : 쿼리키 통합 관리

6 participants