-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat: implement queryOptions export pattern and type-safe query key builder #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 18 commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
a38af84
feat: implement queryOptions export pattern for GET methods
kyleamazza-fq 87d7e2e
docs: Update documentation for queryOptions export pattern
kyleamazza-fq d9fa0dd
Complete Task Group 4: Final verification and release preparation
kyleamazza-fq d300bdf
refactor: preserve full operation names in query options
kyleamazza-fq dec74f9
feat: implement type-safe query key builder generator
kyleamazza-fq 02af6ca
feat: enhance query key builder with improved matchQueryKey support
kyleamazza-fq 33b6acb
refactor: rename query-key-builder-file.ts to query-key-builder.ts
kyleamazza-fq 5ae0718
test: add comprehensive tests for query key builder and update docume…
kyleamazza-fq 015214a
docs: update changelog for v0.2.0 with matchQueryKey feature
kyleamazza-fq 9925b21
Remove plan/ and CLAUDE.md from tracking and add to .gitignore
kyleamazza-fq 79e6135
refactor: use service-specific names instead of generic names
kyleamazza-fq 028af00
fix: keep full method names for infinite query options
kyleamazza-fq c1af9b1
test: add coverage for infinite query options generation
kyleamazza-fq 1c82078
docs: update CHANGELOG for v0.2.0 with complete feature list
kyleamazza-fq cda04f4
style: apply prettier formatting
kyleamazza-fq 5bd1ffb
doc: update basketry URL to doc website
kyleamazza-fq 7e80c01
fix: remove non-null assertion in query key builder
kyleamazza-fq 85e52ac
chore: lint
kyleamazza-fq ebff0d2
0.2.0-alpha.0
kyleamazza 3d9c6f5
feat: re-enable hook name generation for deprecated patterns
kyleamazza-fq 7789c6e
feat: add deprecated hook wrappers for backwards compatibility
kyleamazza-fq a44997f
feat: add tests for deprecated hook generation (Task Group 4)
kyleamazza-fq fcf1046
feat: prepare v0.2.0-alpha.1 release with documentation
kyleamazza-fq 7163b88
feat: add jscodeshift codemod for v0.2 migration
kyleamazza-fq 4dcc25b
docs: add codemod reference to migration guide
kyleamazza-fq c023bf8
docs: add npx jscodeshift command to migration guide
kyleamazza-fq 5d5d830
chore: prepare for v0.2.0-alpha.1 release
kyleamazza-fq e8df9af
fix: revert version to 0.2.0-alpha.0
kyleamazza-fq 215adfd
0.2.0-alpha.1
kyleamazza 035a7c4
fix: handle Get prefix removal for backwards compatibility
kyleamazza-fq 5a225eb
Merge branch 'export-query-options' of personal-github:basketry/react…
kyleamazza-fq 50833b1
style: apply prettier formatting
kyleamazza-fq d949488
0.2.0-alpha.2
kyleamazza 6c5a439
fix: restore v0.1.0 hook patterns with options parameters
kyleamazza-fq c548a49
Merge branch 'export-query-options' of personal-github:basketry/react…
kyleamazza-fq File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -130,3 +130,7 @@ dist | |
| .pnp.* | ||
|
|
||
| lib/ | ||
|
|
||
| # Project-specific files | ||
| plan/ | ||
| CLAUDE.md | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # Changelog | ||
|
|
||
| All notable changes to this project will be documented in this file. | ||
|
|
||
| The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), | ||
| and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
|
||
| ## [0.2.0] - TBD | ||
|
|
||
| ### Changed | ||
|
|
||
| - **BREAKING**: Migrated from wrapper hooks to queryOptions/mutationOptions export pattern | ||
| - Changed from `useWidgets()` to `getWidgetsQueryOptions()` | ||
| - Changed from `useCreateWidget()` to `createWidgetMutationOptions()` | ||
| - Changed from `useInfiniteWidgets()` to `getWidgetsInfiniteQueryOptions()` | ||
| - **BREAKING**: Updated query key structure for better cache management | ||
| - From: `['/widgets', compact({ status: params?.status })].filter(Boolean)` | ||
| - To: `['widget', 'getWidgets', params || {}] as const` | ||
| - Added non-hook service getters in context for use in queryOptions | ||
|
|
||
| ### Added | ||
|
|
||
| - Type-safe `matchQueryKey` function for building query keys with IntelliSense support | ||
| - Supports partial query matching at service, operation, or full parameter levels | ||
| - Provides compile-time type safety and autocomplete for all query operations | ||
| - Enables flexible cache invalidation patterns | ||
| - Test coverage for infinite query options generation | ||
| - Support for direct composition with React Query hooks | ||
| - Better TypeScript inference with queryOptions pattern | ||
|
|
||
| ### Removed | ||
|
|
||
| - Wrapper hook functions (use queryOptions with React Query hooks directly) | ||
| - Complex query key filtering logic | ||
|
|
||
| ## [0.1.x] - Previous versions | ||
|
|
||
| Initial implementation with wrapper hooks pattern. | ||
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.