Open
Conversation
Co-authored-by: Brendan <brendan@wundergraph.com>
Co-authored-by: Brendan <brendan@wundergraph.com>
Co-authored-by: Brendan <brendan@wundergraph.com>
Co-authored-by: Brendan <brendan@wundergraph.com>
Co-authored-by: Brendan <brendan@wundergraph.com>
Co-authored-by: Brendan <brendan@wundergraph.com>
Co-authored-by: Brendan <brendan@wundergraph.com>
|
No actionable comments were generated in the recent review. 🎉 WalkthroughAdds a new Router cost-control documentation page and navigation entry, and extends Router metrics docs with a "Cost Analysis metrics" section containing three new cost-related histogram metrics plus a small formatting tweak. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@docs/router/security/cost-control.mdx`:
- Around line 216-223: Add an inline cross-link from the "Telemetry" (and/or
"Metrics" subsection) text to the existing "Metrics & Monitoring" guide so
readers can jump to detailed export/query instructions; update the paragraph
that mentions OTEL/Prometheus and operation-level attributes (look for the
"Telemetry" heading and the "### Metrics" subsection) to append a parenthetical
or sentence like "See Metrics & Monitoring for exporting and querying metrics"
that links to the guide's doc page.
- Around line 255-308: Update the documentation to consistently use the
canonical config key and directive names: replace occurrences of "list_size" and
"@list_size" in the Best Practices text with "estimated_list_size" and
"@listSize" so they match the config table and directive definitions; ensure
examples and explanatory text (e.g., the YAML snippet under "Start with Measure
Mode" and mentions in "Pick Parameters for `@list_size` Carefully" and "Design for
Pagination") use estimated_list_size and `@listSize`, and keep other symbols like
slicingArguments and `@cost` unchanged.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@docs/router/security/cost-control.mdx`:
- Around line 153-169: The example misuses `@listSize` on the products field which
returns a ProductConnection (non-list); either change the products field to
return a list type (e.g., [Product]) so `@listSize` and slicingArguments like
"first" clearly apply, or add an explicit note explaining how to annotate
connection-style fields (ProductConnection) if the router reads connection
arguments (e.g., that `@listSize` should reference the connection's paging
argument like "first" and that connection types are supported/unsupported).
Update the example and/or surrounding text to use the symbols products,
ProductConnection, searchResults, and `@listSize` so readers aren’t misled.
- Around line 14-17: Update the paragraph describing cost analysis to explicitly
state that only "enforce" mode rejects operations exceeding the configured limit
while "measure" mode allows those operations to proceed (but records/alerts the
exceedance); edit the sentence mentioning "Operations exceeding the configured
limit are rejected immediately" to be conditional on the mode (e.g., "In enforce
mode, operations... are rejected immediately; in measure mode they are allowed
but tracked"), and ensure references to "cost analysis", "measure mode" and
"enforce mode" are used so readers can clearly see mode-specific behavior.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/router/security/cost-control.mdx`:
- Around line 247-248: The Prometheus comment is inconsistent with the delta
sign: router_graphql_operation_cost_delta is defined positive when estimated >
actual (cheaper-than-estimated), but the heading says "Operations where actual
cost exceeds the estimate." Update the heading/comment to match the metric
definition or invert the selector; specifically either change the text to
"Operations where actual cost is lower than the estimate
(cheaper-than-estimated)" to match router_graphql_operation_cost_delta > 0, or
change the check to router_graphql_operation_cost_delta < 0 and adjust
surrounding wording to "actual cost exceeds the estimate."
---
Duplicate comments:
In `@docs/router/security/cost-control.mdx`:
- Around line 160-166: The GraphQL example uses the Relay connection shape
(edges { node { name } }) but the products field actually returns a plain list
[Product]; update the example query so it directly selects the Product field(s)
(e.g., products(first: 20) { name }) instead of edges/node, referencing the
products and name fields to match the [Product] return type.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It includes what is done, differences with IBM spec, and what is not done yet.
Summary by CodeRabbit