Skip to main content

Module query

Module query 

Source
Expand description

Query identities (packages/zero-protocol/src/query-hash-visitor.ts).

The JS implementation folds an AST (or a name and args) into two xxHash32 lanes word by word. These digests are the query IDs the client registers, so they have to match exactly.

Functionsยง

hash_of_ast
hashOfAST: the hash of ast after normalizing it.
hash_of_name_and_args
hashOfNameAndArgs: the identity of a named (custom) query.
hash_of_normalized_ast
The hash of an AST that is already normalized.
hash_of_query_internals
hashOfQueryInternals: the identity of a query as the client sees it.