Skip to content

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

@rbalicki2

Description

@rbalicki2

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions