@elysia-vue-query/core
v2.0.0
Published
Proxy engine, key builders, and serialization for elysia-vue-query
Maintainers
Readme
@elysia-vue-query/core
Framework-agnostic primitives for bridging Eden Treaty with TanStack Query.
Role in the Monorepo
This package provides the foundational layer that all framework-specific bindings depend on:
- Proxy enhancer -- Wraps an Eden Treaty client in a recursive
Proxythat tracks route segments, HTTP methods, and parameters viaSymbolbranding. - Query key builder -- Constructs deterministic, hierarchical key tuples from branded proxy references.
- Stable serialization -- Sorts object keys alphabetically and strips
undefinedvalues, ensuring identical parameters always produce identical cache keys. - Symbol namespacing --
EDEN_ROUTE_SYMBOLprevents collisions with any other TanStack Query keys in the application.
You typically do not install this package directly. It is included as a dependency of @elysia-vue-query/vue and @elysia-vue-query/nuxt.
Install
bun add @elysia-vue-query/coreExports
| Export | Description |
| ---------------------------------------- | --------------------------------------------------- |
| EDEN_ROUTE_SYMBOL | Unique symbol used to namespace all Eden query keys |
| createEdenQueryProxy(client) | Wraps an Eden client in a segment-tracking proxy |
| getRouteMeta(enhanced) | Extracts RouteMeta from a branded proxy |
| buildQueryKey(enhanced) | Builds the canonical query key tuple |
| buildMutationInvalidationKey(enhanced) | Builds a partial key for subtree invalidation |
| buildPartialKey(...segments) | Manually constructs a partial key |
| stableSerialize(input) | Deterministic serialization for cache key params |
Documentation
Full API reference and usage guide: Docs
