Skip to content

docs: add incremental query planner page - #10345

Merged
tninesling merged 17 commits into
dev-v3.xfrom
tninesling/inc-planner-docs
Oct 5, 2026
Merged

tninesling merged 17 commits into
dev-v3.xfrom
tninesling/inc-planner-docs

Conversation

@tninesling

Copy link
Copy Markdown
Contributor

Adds a public docs page for the incremental query planner under Query Planning. It covers:

  • How it differs from the default planner.
  • Enabling it and the beam_width, fuel, and timeout options, with tuning guidance.
  • Behavior changes when enabled: query plan cache keys, native connector planning, plan differences, and ignored experimental_* limits.
  • Observability, including the fuel histograms and query_planning span attributes from feat(incremental-planner): add fuel metrics and span attributes #10344.
  • Rollout steps.

Also adds the incremental_planner block to the shared supergraph config references and adds the page to the sidebar.

Stacked on #10344.

Checklist

  • PR description explains the motivation for the change and relevant context for reviewing
  • PR description links appropriate GitHub/Jira tickets (creating when necessary)
  • Changeset is included for user-facing changes
  • Changes are compatible
  • Documentation completed
  • Performance impact assessed and acceptable
  • Metrics and logs are added and documented
  • Tests added and passing
    • Unit tests
    • Integration tests
    • Manual tests, as necessary

Exceptions

Docs only, so no changeset or tests. The router's YAML examples on the page were checked with router config validate.

🤖 Generated with Claude Code

tninesling and others added 6 commits September 30, 2026 17:22
…grams

The router had no signal for whether the incremental planner's fuel budget
was cutting searches short. A search that exhausts its fuel still returns a
plan, so the planning outcome reads as success either way.

The BULB search now reports the effort spent after its first complete plan,
which QueryPlanningStatistics carries as fuel_consumed and fuel_remaining.
Mutations run one search per top-level field, each with its own budget, so
the statistics keep the search that consumed the most. The router records
both as apollo.router.query_planning.plan.fuel_consumed and
apollo.router.query_planning.plan.fuel_remaining when the incremental planner
is enabled.

Fuel values aren't durations, so the global histogram buckets would put
nearly every sample in the overflow bucket. Both histograms default to
decade buckets from 0 to 1,000,000 that don't depend on the fuel setting,
keeping series comparable when it changes. A user view still overrides them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fuel histograms show how often the budget binds across traffic but not
which operations hit it. Recording fuel_consumed and fuel_remaining on the
query_planning span puts them in the same trace as the operation name.

tracing drops records for fields a span didn't declare, so the span is now
built by query_planning_span(), which declares both fields and lets the test
exercise the production declaration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…stics cases

Planner config doesn't affect composition, but planner!() generates a
fixture per test name, so the three fuel statistics tests carried three
identical supergraph files. One test now composes once and builds a planner
per case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds a page under Query Planning covering how the incremental planner
differs from the default planner, its configuration and tuning, behavior
changes when enabled, the fuel metrics, and rollout. Adds the
incremental_planner block to the shared supergraph config references.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@apollo-librarian

apollo-librarian Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

✅ Docs preview ready

The preview is ready to be viewed. View the preview

File Changes

2 new, 44 changed, 0 removed
+ graphos/routing/(latest)/query-planning/incremental-query-planner.mdx
+ graphos/routing/(latest)/upgrade/from-router-v2.mdx
* graphos/routing/(latest)/operations/subscriptions/configuration.mdx
* graphos/routing/(latest)/errors.mdx
* graphos/routing/(latest)/get-started.mdx
* graphos/routing/(latest)/configuration/cli.mdx
* graphos/routing/(latest)/configuration/envvars.mdx
* graphos/routing/(latest)/configuration/yaml.mdx
* graphos/routing/(latest)/customization/native-plugins.mdx
* graphos/routing/(latest)/customization/coprocessor/index.mdx
* graphos/routing/(latest)/customization/coprocessor/reference.mdx
* graphos/routing/(latest)/customization/rhai/index.mdx
* graphos/routing/(latest)/observability/graphos/graphos-reporting.mdx
* graphos/routing/(latest)/observability/router-telemetry-otel/index.mdx
* graphos/routing/(latest)/observability/router-telemetry-otel/apm-guides/datadog/router-instrumentation.mdx
* graphos/routing/(latest)/observability/router-telemetry-otel/apm-guides/datadog/connecting-to-datadog/datadog-agent/datadog-agent-traces.mdx
* graphos/routing/(latest)/observability/router-telemetry-otel/apm-guides/jaeger/jaeger-traces.mdx
* graphos/routing/(latest)/observability/router-telemetry-otel/apm-guides/prometheus/prometheus-metrics.mdx
* graphos/routing/(latest)/observability/router-telemetry-otel/apm-guides/zipkin/zipkin-traces.mdx
* graphos/routing/(latest)/observability/router-telemetry-otel/enabling-telemetry/conditions.mdx
* graphos/routing/(latest)/observability/router-telemetry-otel/enabling-telemetry/selectors.mdx
* graphos/routing/(latest)/observability/router-telemetry-otel/enabling-telemetry/spans.mdx
* graphos/routing/(latest)/observability/router-telemetry-otel/enabling-telemetry/standard-attributes.mdx
* graphos/routing/(latest)/observability/router-telemetry-otel/enabling-telemetry/standard-instruments.mdx
* graphos/routing/(latest)/observability/router-telemetry-otel/enabling-telemetry/usage-guides/debugging-subgraph-requests.mdx
* graphos/routing/(latest)/observability/router-telemetry-otel/enabling-telemetry/usage-guides/subgraph-error-inclusion.mdx
* graphos/routing/(latest)/observability/router-telemetry-otel/telemetry-pipelines/log-exporters/overview.mdx
* graphos/routing/(latest)/observability/router-telemetry-otel/telemetry-pipelines/trace-exporters/overview.mdx
* graphos/routing/(latest)/performance/circuit-breaking.mdx
* graphos/routing/(latest)/performance/traffic-shaping.mdx
* graphos/routing/(latest)/performance/caching/response-caching/customization.mdx
* graphos/routing/(latest)/performance/caching/response-caching/faq.mdx
* graphos/routing/(latest)/performance/caching/response-caching/invalidation.mdx
* graphos/routing/(latest)/performance/caching/response-caching/observability.mdx
* graphos/routing/(latest)/performance/caching/response-caching/overview.mdx
* graphos/routing/(latest)/performance/caching/response-caching/quickstart.mdx
* graphos/routing/(latest)/query-planning/caching.mdx
* graphos/routing/(latest)/query-planning/query-planning-best-practices.mdx
* graphos/routing/(latest)/security/demand-control.mdx
* graphos/routing/(latest)/security/jwt.mdx
* graphos/routing/(latest)/security/router-authentication.mdx
* graphos/routing/(latest)/self-hosted/containerization/docker-router-only.mdx
* graphos/routing/(latest)/self-hosted/containerization/docker.mdx
* graphos/routing/(latest)/self-hosted/containerization/proxy-certificates.mdx
* graphos/routing/(latest)/upgrade/from-router-v1.mdx
* graphos/routing/(latest)/_sidebar.yaml

Build ID: d5f6534459e3616f91a24a71
Build Logs: View logs

URL: https://www.apollographql.com/docs/deploy-preview/d5f6534459e3616f91a24a71


⚠️ AI Style Review — 42 Issues Found

Summary

This pull request implements style guide improvements across several documentation sections. Key updates include: framing content relative to the reader using 'your' and direct language; removing articles before standalone product and feature names like 'incremental planner'; standardizing structural elements by using hyphens for unordered lists and ensuring complete sentences have ending punctuation; and refining text formatting by avoiding vague link text and bold for emphasis. Additionally, the changes prioritize active voice, incorporate dictionary-valid contractions for readability, and replace non-standard terminology (e.g., using 'reduce' instead of 'lower' and 'graph' instead of 'data graph') with prescribed alternatives to ensure a more authoritative and accessible tone.

Duration: 3438ms
Review Log: View detailed log

This review is AI-generated. Please use common sense when accepting these suggestions, as they may not always be accurate or appropriate for your specific context.

@mergify

mergify Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

Comment thread docs/shared/config/supergraph.mdx
Comment thread docs/shared/router-config-properties-table.mdx
Comment thread docs/shared/router-yaml-complete.mdx
Comment thread docs/source/routing/query-planning/incremental-query-planner.mdx Outdated
Comment thread docs/source/routing/query-planning/incremental-query-planner.mdx Outdated
Comment thread docs/source/routing/query-planning/incremental-query-planner.mdx Outdated
Comment thread docs/source/routing/query-planning/incremental-query-planner.mdx Outdated
Comment thread docs/source/routing/query-planning/incremental-query-planner.mdx Outdated
Comment thread docs/source/routing/query-planning/incremental-query-planner.mdx Outdated
Comment thread docs/source/routing/query-planning/incremental-query-planner.mdx Outdated
tninesling and others added 6 commits September 30, 2026 21:17
Reframe the planner as drafting a plan and then optimizing it within the
fuel budget, and describe backtracking out of dead ends while drafting.
Note the memory and backtracking trade-off for beam_width. Drop the
connector expansion detail, the subgraph operation note that applies to
both planners, and the rollout section. Describe what evaluated_plans and
evaluated_paths count for this planner. List enabled first in the shared
config references, and apply style fixes for contractions, may, and since.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds a section covering decisions and options, how options are scored and
ranked, discrepancy passes, what fuel counts, timeout behavior before and
after the draft, and a worked example where a second pass replaces a
three-fetch greedy draft with a two-fetch plan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Base automatically changed from tninesling/inc-planner-fuel-metrics to dev-v3.x October 2, 2026 15:34
@tninesling
tninesling requested review from a team as code owners October 2, 2026 15:34
tninesling and others added 4 commits October 2, 2026 11:36
…anner-docs

# Conflicts:
#	apollo-router/src/query_planner/query_planner_service.rs
The doc said "effort budget" in the frontmatter description, the intro
paragraph, and steps 2-3 of "How it differs from the default planner,"
but switched to "fuel budget" everywhere else (Decisions and options,
Fuel and timeout, the config table). "Fuel" is the only term users
actually see in router.yaml and in the fuel_consumed/fuel_remaining
metrics and span attributes, so standardize on it throughout.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The four-step tie-break rule (@provides, current subgraph, entity hops
by key size, then schema order) was packed into one run-on sentence,
making the order easy to misread. Pull it out into a numbered list.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
"Discrepancies and passes" used "beam" and "discrepancy" before ever
explaining what they meant, packed into a single dense sentence with
the pass-schedule explanation. Give each term its own sentence: what a
beam is, what beam_width controls, and what choosing a discrepancy
means and why the search does it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@mabuyo

mabuyo commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

@tninesling I pushed minor changes but please review for accuracy! Please merge when ready, though sooner the better :)

…o clarify that there can be multiple beams per decision, and discrepancies are outside the first beam
@tninesling
tninesling merged commit 7d1f48f into dev-v3.x Oct 5, 2026
13 checks passed
@tninesling
tninesling deleted the tninesling/inc-planner-docs branch October 5, 2026 20:23
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

Successfully merging this pull request may close these issues.

3 participants