Split `entrypoint.ts` artifact into two artifacts: query text and normalization AST
rbalicki2 opened this issue · comments
Robert Balicki commented
Problem and solution
- An entrypoint is two things: query text and normalization AST
- We do not need the normalization AST to make the network request, just the query text
- We should split this into two files, with the entrypoint (containing the query text) importing the file with the normalization AST.
- The files should be named
Type/field/entrypoint.ts
(containing the query text) and/normalization.ts
, containing the normalization AST.
Follow up:
This unblocks the following:
- This will make it possible to asynchronously load the normalization AST, for example right after the query text is loaded, when the network request is made or when the network response is received
- We do not want to asynchronously load the normalization AST, as not having the normalization AST means that we cannot determine whether the network request can be completed from the store, so there is a legitimate use case for bundling the normalization AST (i.e. with a regular import) with the query text
Ismajl Ramadani commented
Can I work on this as well?