chore: supply GraphQLResponse info in resolve benchmark#1227
chore: supply GraphQLResponse info in resolve benchmark#1227
Conversation
WalkthroughThe update explicitly initializes the Changes
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
v2/pkg/engine/resolve/resolve_test.go (1)
6571-6573: Consider de-duplicating repeated plan boilerplateYou added an identical
Infostanza to the second benchmark. While harmless, the same three-line snippet now appears in multiple benchmark plans. A tiny helper (e.g.withQueryInfo(plan *GraphQLResponse)) would reduce copy-paste across future benches.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
v2/pkg/engine/resolve/resolve_test.go(2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: SkArchon
PR: wundergraph/graphql-go-tools#1203
File: v2/pkg/engine/resolve/loader.go:63-67
Timestamp: 2025-07-02T15:28:02.122Z
Learning: In the graphql-go-tools codebase, result structs are consistently initialized with non-nil bytes.Buffer instances, making additional nil checks for res.out unnecessary defensive programming.
v2/pkg/engine/resolve/resolve_test.go (1)
undefined
<retrieved_learning>
Learnt from: SkArchon
PR: #1203
File: v2/pkg/engine/resolve/loader.go:63-67
Timestamp: 2025-07-02T15:28:02.122Z
Learning: In the graphql-go-tools codebase, result structs are consistently initialized with non-nil bytes.Buffer instances, making additional nil checks for res.out unnecessary defensive programming.
</retrieved_learning>
🧬 Code Graph Analysis (1)
v2/pkg/engine/resolve/resolve_test.go (3)
v2/pkg/engine/resolve/response.go (1)
GraphQLResponseInfo(34-36)pkg/graphql/request.go (2)
OperationType(21-21)OperationTypeQuery(25-25)v2/pkg/ast/ast_operation_definition.go (2)
OperationType(11-11)OperationTypeQuery(15-15)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Build and test (go 1.23 / windows-latest)
- GitHub Check: Build and test (go 1.23 / ubuntu-latest)
- GitHub Check: Build and test (go 1.23 / windows-latest)
🔇 Additional comments (1)
v2/pkg/engine/resolve/resolve_test.go (1)
6261-6263: Nil-panic fixed – initialization looks goodSupplying
InfowithOperationTypeQueryprevents theResolveGraphQLResponsehelper from panicking in this benchmark.
No further issues spotted.
Two benchmarks were panicing because GraphQLResponse.Info is expected to be non-nil in the ResolveGraphQLResponse method. This fixes resolve benchmarks.
78525f9 to
1601cc4
Compare
Two benchmarks were panicing because GraphQLResponse.Info is expected to be non-nil in the ResolveGraphQLResponse method.
This fixes resolve benchmarks.
Summary by CodeRabbit