Repository navigation
refactor: improve and cleanup (unused) code - #788
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 50 minutes. View limit details
No actionable comments were generated in the recent review. Summary
Change: Refactor Merge Risk:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #788 +/- ##
==========================================
+ Coverage 84.49% 85.26% +0.77%
==========================================
Files 151 148 -3
Lines 5113 5082 -31
Branches 891 886 -5
==========================================
+ Hits 4320 4333 +13
+ Misses 491 448 -43
+ Partials 302 301 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
All reported issues were addressed across 17 files
Architecture diagram
sequenceDiagram
participant Client as GraphQL Client
participant Ktor as Ktor Application
participant GraphQL as GraphQL Plugin
participant Schema as Schema Compilation
participant Model as Schema Model
participant Executor as ParallelRequestExecutor
participant DataLoader as DataLoader (external lib)
Note over Client,Executor: GraphQL Request Flow with Schema Compilation
Client->>Ktor: HTTP POST /graphql (query)
Ktor->>GraphQL: handleRequest()
GraphQL->>Schema: compile/validate schema
Schema->>Schema: buildList() for types
Note over Schema: Efficient collection building<br/>without intermediate lists
Schema->>Model: SchemaModel(allTypes)
Model->>Model: Build type lookup maps
GraphQL->>Executor: execute query
Executor->>Executor: Parse execution tree
Executor->>DataLoader: batch load keys
Note over Executor,DataLoader: NEW: coroutineContext reference fix
DataLoader->>Executor: batched results
alt Has receiver
Executor->>Executor: invoke directly
else Subscription
Executor->>Executor: getSubscriptionArgs() (exhaustive when)
end
Executor->>GraphQL: Execution results
GraphQL-->>Ktor: GraphQL response
Ktor-->>Client: HTTP 200 (JSON)
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Mainly: - Avoid list creation if not required - Otherwise, use collection builders to reduce amount of intermediate lists - Remove unused classes, functions and properties - Replace `map` with `forEach` when return value was not used
2a73124 to
08c15b1
Compare
Mainly:
mapwithforEachwhen return value was not used