apollographql / apollographql/federation

Query plan `alias` field is never populated

Open
#1,091 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
727
Forks
276
Avg merge
1h 47m
Merged PRs (30d)
1

Description

Doing a search of the code indicates that https://github.com/apollographql/federation/blob/ffe0687ba82d0faf44cb38fbe2c8c3067054dc2d/query-planner-js/src/QueryPlan.ts#L51 is never being written to.

It is read here: https://github.com/apollographql/federation/blob/ffe0687ba82d0faf44cb38fbe2c8c3067054dc2d/query-planner-js/src/QueryPlan.ts#L69

And a candidate for population is here: https://github.com/apollographql/federation/blob/ffe0687ba82d0faf44cb38fbe2c8c3067054dc2d/query-planner-js/src/QueryPlan.ts#L96

It looks like there are no tests that exercise the `alias` field.

Contributor guide

Open the contributing guide

Research direction

Start in query-planner-js/src/QueryPlan.ts at the alias field around lines 51, 69, and 96, tracing how query plans are constructed and read. Add test coverage for the alias field, confirming it is populated and available where it is consumed.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
backend-api-design
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.