@@ -134,21 +134,21 @@ type Product implements Node {
134
134
using var subgraphs = new TestSubgraphCollection ( output , [ subgraphA , subgraphB ] ) ;
135
135
var executor = await subgraphs . GetExecutorAsync ( ) ;
136
136
var request = Parse ( """
137
- query {
138
- productsA {
139
- id
140
- name
141
- price
142
- reviewCount
143
- }
144
- productsB {
145
- id
146
- name
147
- price
148
- reviewCount
149
- }
150
- }
151
- """ ) ;
137
+ query {
138
+ productsA {
139
+ id
140
+ name
141
+ price
142
+ reviewCount
143
+ }
144
+ productsB {
145
+ id
146
+ name
147
+ price
148
+ reviewCount
149
+ }
150
+ }
151
+ """ ) ;
152
152
153
153
// act
154
154
var result = await executor . ExecuteAsync (
@@ -260,10 +260,10 @@ public async Task Authors_And_Reviews_Query_GetUserReviews_Report_Cost()
260
260
// act
261
261
var fusionGraph = await new FusionGraphComposer ( logFactory : _logFactory )
262
262
. ComposeAsync (
263
- [
264
- demoProject . Reviews2 . ToConfiguration ( Reviews2ExtensionWithCostSdl ) ,
265
- demoProject . Accounts . ToConfiguration ( AccountsExtensionWithCostSdl )
266
- ] ) ;
263
+ [
264
+ demoProject . Reviews2 . ToConfiguration ( Reviews2ExtensionWithCostSdl ) ,
265
+ demoProject . Accounts . ToConfiguration ( AccountsExtensionWithCostSdl )
266
+ ] ) ;
267
267
268
268
var executor = await new ServiceCollection ( )
269
269
. AddSingleton ( demoProject . HttpClientFactory )
@@ -1656,11 +1656,7 @@ public async Task Forward_Nested_Variables_No_OpName()
1656
1656
. New ( )
1657
1657
. SetDocument ( request )
1658
1658
. SetVariableValues (
1659
- new Dictionary < string , object ? >
1660
- {
1661
- { "id" , "UHJvZHVjdDox" } ,
1662
- { "first" , 1 } ,
1663
- } )
1659
+ new Dictionary < string , object ? > { { "id" , "UHJvZHVjdDox" } , { "first" , 1 } , } )
1664
1660
. Build ( ) ) ;
1665
1661
1666
1662
// assert
@@ -2028,10 +2024,7 @@ public async Task GetFirstPage_With_After_Null()
2028
2024
2029
2025
// act
2030
2026
var fusionGraph = await new FusionGraphComposer ( logFactory : _logFactory ) . ComposeAsync (
2031
- new [ ]
2032
- {
2033
- demoProject . Appointment . ToConfiguration ( ) ,
2034
- } ,
2027
+ new [ ] { demoProject . Appointment . ToConfiguration ( ) , } ,
2035
2028
new FusionFeatureCollection ( FusionFeatures . NodeField ) ) ;
2036
2029
2037
2030
var executor = await new ServiceCollection ( )
@@ -2232,6 +2225,114 @@ type ResaleSurveyFeedback {
2232
2225
await snapshot . MatchMarkdownAsync ( ) ;
2233
2226
}
2234
2227
2228
+ [ Fact ]
2229
+ public async Task BatchExecutionState_With_Multiple_Variable_Values_Some_Items_Null ( )
2230
+ {
2231
+ // arrange
2232
+ var subgraphA = await TestSubgraph . CreateAsync (
2233
+ """
2234
+ type Query {
2235
+ node(id: ID!): Node
2236
+ nodes(ids: [ID!]!): [Node]!
2237
+ }
2238
+
2239
+ interface Node {
2240
+ id: ID!
2241
+ }
2242
+
2243
+ type User implements Node {
2244
+ id: ID!
2245
+ displayName: String!
2246
+ }
2247
+ """ ) ;
2248
+ var subgraphB = await TestSubgraph . CreateAsync (
2249
+ """
2250
+ type Query {
2251
+ node(id: ID!): Node
2252
+ nodes(ids: [ID!]!): [Node]! @null(atIndex: 1)
2253
+ userBySlug(slug: String!): User
2254
+ }
2255
+
2256
+ interface Node {
2257
+ id: ID!
2258
+ }
2259
+
2260
+ type User implements Node {
2261
+ relativeUrl: String!
2262
+ id: ID!
2263
+ }
2264
+ """ ) ;
2265
+ var subgraphC = await TestSubgraph . CreateAsync (
2266
+ """
2267
+ type Query {
2268
+ node(id: ID!): Node
2269
+ nodes(ids: [ID!]!): [Node]!
2270
+ }
2271
+
2272
+ interface Node {
2273
+ id: ID!
2274
+ }
2275
+
2276
+ type User implements Node {
2277
+ id: ID!
2278
+ feedbacks: FeedbacksConnection
2279
+ }
2280
+
2281
+ type FeedbacksConnection {
2282
+ edges: [FeedbacksEdge!]
2283
+ }
2284
+
2285
+ type FeedbacksEdge {
2286
+ node: ResaleFeedback!
2287
+ }
2288
+
2289
+ type ResaleFeedback implements Node {
2290
+ feedback: ResaleSurveyFeedback
2291
+ id: ID!
2292
+ }
2293
+
2294
+ type ResaleSurveyFeedback {
2295
+ buyer: User
2296
+ }
2297
+ """ ) ;
2298
+
2299
+ using var subgraphs = new TestSubgraphCollection ( output , [ subgraphA , subgraphB , subgraphC ] ) ;
2300
+ var executor = await subgraphs . GetExecutorAsync ( ) ;
2301
+
2302
+ var request = Parse (
2303
+ """
2304
+ query {
2305
+ userBySlug(slug: "me") {
2306
+ feedbacks {
2307
+ edges {
2308
+ node {
2309
+ feedback {
2310
+ buyer {
2311
+ relativeUrl
2312
+ displayName
2313
+ }
2314
+ }
2315
+ }
2316
+ }
2317
+ }
2318
+ }
2319
+ }
2320
+
2321
+ """ ) ;
2322
+
2323
+ // act
2324
+ await using var result = await executor . ExecuteAsync (
2325
+ OperationRequestBuilder
2326
+ . New ( )
2327
+ . SetDocument ( request )
2328
+ . Build ( ) ) ;
2329
+
2330
+ // assert
2331
+ var snapshot = new Snapshot ( ) ;
2332
+ CollectSnapshotData ( snapshot , request , result ) ;
2333
+ await snapshot . MatchMarkdownAsync ( ) ;
2334
+ }
2335
+
2235
2336
[ Fact ]
2236
2337
public async Task BatchExecutionState_With_Multiple_Variable_Values_And_Forwarded_Variable ( )
2237
2338
{
@@ -2401,10 +2502,7 @@ type Query {
2401
2502
}
2402
2503
}
2403
2504
""" )
2404
- . SetVariableValues ( new Dictionary < string , object ? >
2405
- {
2406
- [ "productId" ] = "UHJvZHVjdAppMzg2MzE4NTk="
2407
- } )
2505
+ . SetVariableValues ( new Dictionary < string , object ? > { [ "productId" ] = "UHJvZHVjdAppMzg2MzE4NTk=" } )
2408
2506
. Build ( ) ;
2409
2507
2410
2508
// act
@@ -2478,10 +2576,7 @@ type Query {
2478
2576
}
2479
2577
}
2480
2578
""" )
2481
- . SetVariableValues ( new Dictionary < string , object ? >
2482
- {
2483
- [ "productId" ] = "UHJvZHVjdAppMzg2MzE4NTk="
2484
- } )
2579
+ . SetVariableValues ( new Dictionary < string , object ? > { [ "productId" ] = "UHJvZHVjdAppMzg2MzE4NTk=" } )
2485
2580
. Build ( ) ;
2486
2581
2487
2582
// act
@@ -2559,10 +2654,7 @@ type Query {
2559
2654
}
2560
2655
}
2561
2656
""" )
2562
- . SetVariableValues ( new Dictionary < string , object ? >
2563
- {
2564
- [ "productId" ] = "UHJvZHVjdAppMzg2MzE4NTk="
2565
- } )
2657
+ . SetVariableValues ( new Dictionary < string , object ? > { [ "productId" ] = "UHJvZHVjdAppMzg2MzE4NTk=" } )
2566
2658
. Build ( ) ;
2567
2659
2568
2660
// act
@@ -2580,10 +2672,7 @@ public async Task Two_Arguments_Differing_Nullability_Does_Not_Duplicate_Forward
2580
2672
2581
2673
// act
2582
2674
var fusionGraph = await new FusionGraphComposer ( logFactory : _logFactory ) . ComposeAsync (
2583
- new [ ]
2584
- {
2585
- demoProject . Accounts . ToConfiguration ( AccountsExtensionSdl )
2586
- } ) ;
2675
+ new [ ] { demoProject . Accounts . ToConfiguration ( AccountsExtensionSdl ) } ) ;
2587
2676
2588
2677
var executor = await new ServiceCollection ( )
2589
2678
. AddSingleton ( demoProject . HttpClientFactory )
0 commit comments