Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split entrypoint.ts artifact into two artifacts: query text and normalization AST #33

Open
rbalicki2 opened this issue Mar 20, 2024 · 1 comment

Comments

@rbalicki2
Copy link
Collaborator

rbalicki2 commented Mar 20, 2024

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
Copy link
Contributor

Can I work on this as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants