Description
Repeatedly querying the identical state of a fractional vault wastes database I/O and increases client wait times.
Architecture & Context
Aligning with GRAPHQL_IMPLEMENTATION.md, the backend must implement deterministic ETag generation. By hashing the current ledger sequence and the requested Vault ID, the Fastify server can return 304 Not Modified for unchanged data, leveraging browser-level caching.
Technical Requirements
- Generate ETags using
crypto.createHash('sha256') based on ledger state.
- Intercept GraphQL requests to validate
If-None-Match headers.
- Bypass Prisma queries entirely if the ETag validates.
Acceptance Criteria
Description
Repeatedly querying the identical state of a fractional vault wastes database I/O and increases client wait times.
Architecture & Context
Aligning with GRAPHQL_IMPLEMENTATION.md, the backend must implement deterministic ETag generation. By hashing the current ledger sequence and the requested Vault ID, the Fastify server can return
304 Not Modifiedfor unchanged data, leveraging browser-level caching.Technical Requirements
crypto.createHash('sha256')based on ledger state.If-None-Matchheaders.Acceptance Criteria
304 Not Modified.