routier-collection / core/src / deserializeQueryOptions
Function: deserializeQueryOptions()
deserializeQueryOptions(
serialized,schema,resolveSchema,scopeFor?):QueryOptionsCollection<any>
Defined in: core/src/plugins/wire/query.ts:187
Rebuilds query options from their wire form, against the receiver's own schemas.
The closures that were dropped are reconstructed here rather than sent:
- a sort selector from its property, which is all
JsonTranslator.sortreads; - a filter predicate from its expression tree, via
toStrictPredicate— which THROWS rather than keeping a row it cannot judge, because on a receiver a filter that quietly stops filtering returns rows the requester excluded.
Parameters
serialized
schema
CompiledSchema<any>
resolveSchema
scopeFor?
A receiver-side filter per collection, applied to this collection AND to every collection a join reaches. Prepended, so it is ANDed with whatever the sender sent and there is no order of options that removes it.
Returns
Throws
when a named property or collection is not declared by the receiver's schemas. A payload describing data this side does not have is a disagreement, and it has to be loud.