captbaritone / grats

Implementation-First GraphQL for TypeScript

Home Page:https://grats.capt.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Refactor: Update Extractor to be syntax only

captbaritone opened this issue · comments

Right now Extractor leverages the type context in ways that mutate it to track observed values. This makes the data tracking less explicit and also prevents an incremental future where individual file parses can be reused.

Instead, we should have Extractor return an artifact that is based purely on syntactic analysis and perform the mutation and definition lookups for a second phase.

So, ideal outcomes:

  • No type context beyond the current file is observed
  • No mutations to external structures (TypeContext)
  • Returns a concrete structure (ideally serializable)