React query feature#17
Open
RejectKid wants to merge 5 commits into
Open
Conversation
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.
Summary
Adds TanStack Query generation to
ZibStack.NET.TypeGen.This introduces
TypeTarget.TanStackQueryplus fluentTanStackQuerySettings, then emits typed TanStack Query v5 client code from TypeGen’s discovered endpoint model. Generated output includes fetch functions, query keys,queryOptions,mutationOptions, React hooks, prefetch helpers, and invalidation helpers.The endpoint model now also reads Minimal API
.WithName(...)and.WithTags(...), so generated operation names and query-key groups can be controlled from normal Minimal API metadata.Also adds docs and a richer SampleApi workflow showing Minimal API + generated TanStack Query output.
Lemme know how you feel about this? some team members were asking if zib could have this feature
Affected package(s)
ZibStack.NET.TypeGenZibStack.NET.TypeGen.Abstractionsdocspackages/ZibStack.NET.TypeGen/sample/SampleApiType of change
How was this verified?
Added/updated tests for:
TanStackQuery(...)configuration parsing.WithName(...)/.WithTags(...)endpoint metadataapi.gen.tsoutputCommands run:
dotnet build packages/ZibStack.NET.TypeGen/src/ZibStack.NET.TypeGen/ZibStack.NET.TypeGen.csproj dotnet build packages/ZibStack.NET.TypeGen/tests/ZibStack.NET.TypeGen.Tests/ZibStack.NET.TypeGen.Tests.csproj dotnet build packages/ZibStack.NET.TypeGen/sample/SampleApi/SampleApi.csproj -c Release --nologo dotnet test packages/ZibStack.NET.TypeGen/tests/ZibStack.NET.TypeGen.Tests/ZibStack.NET.TypeGen.Tests.csproj --no-build -v normal