Skip to content

JS/TS: template-literal URLs in fetch/query hooks produce no HTTP_CALLS or Route nodes (static literals work) #1006

Description

@CharlesQueiroz

Version: 0.9.0 (macOS arm64, official install.sh)
Stack: TypeScript, Vite + TanStack Query frontend calling a REST backend indexed in the same store

Observed

Client-side URL extraction only captures static string literals. Template literals with interpolations are silently skipped:

const THINGS_PATH = '/api/v1/things'                 // -> Route node + HTTP_CALLS edge: OK

function thingDetailPath(id: string) {
  return `/api/v1/things/${id}/detail`               // -> no Route node, no HTTP_CALLS edge
}

Meanwhile the backend side of the same store normalizes path params nicely (__route__GET__/api/v1/things/{}/detail), so the join key exists on one side only and cross-repo route matching misses every parameterized endpoint. In our sample 1 of 3 known FE->BE endpoint pairs matched; the misses were exactly the template-literal ones.

Expected / suggestion

Normalize template-literal interpolations to the same {} placeholder used on the server side (/api/v1/things/${id}/detail -> __route__ANY__/api/v1/things/{}/detail), at least when the literal starts with a static / segment. That would make the FE and BE sides of the join agree.

Related in spirit to #523 / #678 (cross-repo intelligence returning 0 edges), but this one is specifically the client-side template-literal gap.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingparsing/qualityGraph extraction bugs, false positives, missing edgespriority/normalStandard review queue; useful PR with ordinary maintainer urgency.ux/behaviorDisplay bugs, docs, adoption UX

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions