fix: fix NullPointer for data properties inside union properties#681
Conversation
|
Warning Review limit reached
Next review available in: 53 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR fixes an NPE in ChangesUnion data loader fix
Sequence Diagram(s)sequenceDiagram
participant Query as GraphQL Query
participant Executor as ParallelRequestExecutor
participant Union as Execution.Union
participant Loader as DataLoader
Query->>Executor: request items via union fragment
Executor->>Union: inspect memberChildren for Field.DataLoader
Union-->>Executor: found nested loader fields
Executor->>Loader: construct and register loader
Query->>Executor: resolve author field
Executor->>Loader: checkNotNull(loaders[field])
Loader-->>Executor: resolved Author instance
Executor-->>Query: serialized data
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #681 +/- ##
==========================================
- Coverage 84.23% 84.20% -0.04%
==========================================
Files 151 151
Lines 4991 4994 +3
Branches 858 860 +2
==========================================
+ Hits 4204 4205 +1
- Misses 489 490 +1
- Partials 298 299 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
No issues found across 2 files
Architecture diagram
sequenceDiagram
participant Client as Test Client
participant Schema as KGraphQL Schema
participant Executor as ParallelRequestExecutor
participant Union as Execution.Union
participant Node as Execution.Node (Novel)
participant Loader as DataLoader
Client->>Schema: executeBlocking(query)
Schema->>Executor: execute(rootExecution)
Executor->>Executor: inspect() root execution tree
alt Execution is Union
Executor->>Union: NEW: inspect memberChildren
Union->>Node: flatten().inspect()
Node->>Executor: children (including 'author' field)
alt field has DataLoader
Executor->>Loader: prepare(authorId)
Loader-->>Executor: preparedValue
Note over Executor: CHANGED: checkNotNull(loader) guard
Executor->>Loader: loadAsync(preparedValue)
Loader-->>Executor: Author result
end
end
Executor-->>Schema: resolved nodes
Schema-->>Client: JSON result
0f0e336 to
924a3ad
Compare
Fixes #667