Skip to content

feat(use-api-query-key): refactor use-api-query-key composable & create api-doc cli#5668

Merged
piggggggggy merged 4 commits intodevelopfrom
feature-vue-query-enhancement
Mar 4, 2025
Merged

feat(use-api-query-key): refactor use-api-query-key composable & create api-doc cli#5668
piggggggggy merged 4 commits intodevelopfrom
feature-vue-query-enhancement

Conversation

@piggggggggy
Copy link
Copy Markdown
Member

Skip Review (optional)

  • Minor changes that don't affect the functionality (e.g. style, chore, ci, test, docs)
  • Previously reviewed in feature branch, further review is not mandatory
  • Self-merge allowed for solo developers or urgent changes

Description (optional)

  • Refactor use-api-query-key composable. Improve arguments injection method. (service / resource / verb)
  • Create api-doc generating cli for api architecture document.

Things to Talk About (optional)

Signed-off-by: samuel.park <samuel.park@megazone.com>
Signed-off-by: samuel.park <samuel.park@megazone.com>
Signed-off-by: samuel.park <samuel.park@megazone.com>
Signed-off-by: samuel.park <samuel.park@megazone.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 27, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
console ⬜️ Ignored (Inspect) Feb 27, 2025 5:53am
dashboard ⬜️ Ignored (Inspect) Feb 27, 2025 5:53am
inventory-v2 ⬜️ Ignored (Inspect) Feb 27, 2025 5:53am
web-storybook ⬜️ Ignored (Inspect) Feb 27, 2025 5:53am

@github-actions
Copy link
Copy Markdown
Contributor

🎉 @WANZARGEN and @seungyeoneeee have been randomly selected as the reviewers! Please review. 🙏

],
},
} as const;
export type APIDoc = typeof API_DOC;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[Question] Great implementation! Since API_DOC is only used for type inference and isn’t referenced anywhere else, it won’t affect runtime performance due to Vite’s tree shaking.

Just curious—did you consider defining APIDoc directly as a TypeScript type without creating the API_DOC object? It would achieve the same type safety and autocomplete without creating a constant, even if it’s tree-shaken. Not a required change, just wanted to know your thoughts! 😊

--
[Question] 좋은 구현이네요! API_DOC이 타입 추론용으로만 사용되고 다른 곳에서는 참조되지 않기 때문에, Vite의 트리 쉐이킹 덕분에 런타임 성능에 영향을 주지 않을 거라는 점도 확인했습니다.

그런데 혹시 API_DOC 객체를 생성하지 않고 TypeScript 타입으로만 APIDoc을 정의하는 방법도 고려해보셨나요? 이렇게 하면 (트리 쉐이킹과 관계없이) 상수를 만들지 않고도 동일한 타입 안정성과 자동 완성을 얻을 수 있습니다. 꼭 바꿀 필요는 없고, 단지 의견이 궁금해서 여쭤봅니다! 😊

Copy link
Copy Markdown
Contributor

@seungyeoneeee seungyeoneeee left a comment

Choose a reason for hiding this comment

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

LGTM 😮😯

@piggggggggy piggggggggy merged commit b81dda9 into develop Mar 4, 2025
11 of 13 checks passed
@piggggggggy piggggggggy deleted the feature-vue-query-enhancement branch March 5, 2025 00:06
@github-actions github-actions bot mentioned this pull request Mar 27, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants