Background: entrypoint artifacts and normalization ASTs
For each iso(`entrypoint Type.Field`) literal that the compiler encounters, it will generate a Type/Field/entrypoint.ts file.
This file currently (i.e. pre #33) contains a query text and a normalization AST.
The query text is used when making the query
The normalization AST is (currently) only used to write the network response into the key-value store and for garbage collection (which is also only done after the network response is received).
They will (after #42) be used to determine whether a network request needs to be made.
Because the normalization AST is only used after a network response is received, we can fetch the normalization AST later (e.g. when making the network request).
This should be controllable with a directive on the entrypoint
So, the iso literal parser should be modified to include support for parsing directives
Whether the normalization AST is hard-loaded should be reflected in the type of the entrypoint, since the entrypoint cannot be used with an if-necessary fetch policy if the normalization AST is not present.
One should be able to eventually call entrypoint.loadNormalizationAst().then(entrypointWithNormalizationAst => fetchIfNecessary(...)) or the like
Background: entrypoint artifacts and normalization ASTs
iso(`entrypoint Type.Field`)
literal that the compiler encounters, it will generate aType/Field/entrypoint.ts
file.This epic
if-necessary
fetch policy if the normalization AST is not present.entrypoint.loadNormalizationAst().then(entrypointWithNormalizationAst => fetchIfNecessary(...))
or the like