Open
Conversation
Threads ExtResult generic through all hook signatures to support ZenStack plugins that define computed fields. Users can now pass a ClientContract type to useClientQueries to get fully-typed computed fields in results. Backwards compatible - existing code without ExtResult continues to work.
Replace TrimDelegateModelOperations with TrimSlicedOperations to support client-level model/operation/procedure slicing via QueryOptions. Pass Options through to all Args types for filter slicing support.
…ent-helpers Replace local type definitions with shared utilities from @zenstackhq/client-helpers. Collapse useClientQueries to a single Client generic - Schema, Options, and ExtResult are all inferred automatically. Slicing tests now use ClientContract types to embed options.
…Client
Hooks are not subject to result extension — pass {} directly instead of
threading ExtResult through ClientHooks, ModelQueryHooks, and
ModelMutationModelResult. Matches upstream TanStack Query refactor.
The previous commit over-removed ExtResult from all hooks. Model hooks
need ExtResult for plugin-computed field support. Procedure hooks don't
have computed fields, so they correctly use {}.
Matches upstream TanStack Query fix (zenstackhq/zenstack@d5aead0).
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
ExtResulttype parameter through all hook signatures. Users can pass aClientContracttype (e.g.typeof db) touseClientQueriesto get type-safe computed fields in query/mutation results.TrimDelegateModelOperationswithTrimSlicedOperations, useGetSlicedModelsandGetSlicedProceduresto respect client-level model/operation/procedure slicing viaQueryOptions.Optionsto all Args types (ExistsArgs,CountArgs,AggregateArgs,GroupByArgs,UpdateManyArgs,DeleteManyArgs) for filter slicing support.{}.Test plan
@zenstackhq/ormis updated to the version withExtResultsupport🤖 Generated with Claude Code