Skip to content

React query feature#17

Open
RejectKid wants to merge 5 commits into
MistyKuu:masterfrom
RejectKid:react-query-feature
Open

React query feature#17
RejectKid wants to merge 5 commits into
MistyKuu:masterfrom
RejectKid:react-query-feature

Conversation

@RejectKid

Copy link
Copy Markdown

Summary

Adds TanStack Query generation to ZibStack.NET.TypeGen.

This introduces TypeTarget.TanStackQuery plus fluent TanStackQuerySettings, 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.TypeGen
  • ZibStack.NET.TypeGen.Abstractions
  • docs
  • packages/ZibStack.NET.TypeGen/sample/SampleApi

Type of change

  • Bug fix
  • New feature
  • Generator / generated-code behavior change
  • Analyzer / diagnostic change
  • Docs only
  • Build / tooling

How was this verified?

Added/updated tests for:

  • TanStack Query emitter output
  • Fluent TanStackQuery(...) configuration parsing
  • Minimal API .WithName(...) / .WithTags(...) endpoint metadata
  • SampleApi generated api.gen.ts output

Commands 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant