Skip to content

Commit dffbc05

Browse files
committed
adjust snapshots
1 parent 983ac7f commit dffbc05

File tree

14 files changed

+424
-190
lines changed

14 files changed

+424
-190
lines changed

lib/query-planner/src/tests/alias.rs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ fn circular_reference_interface() -> Result<(), Box<dyn Error>> {
7676
id
7777
}
7878
},
79-
Flatten(path: "product") {
79+
Flatten(path: "product|[Book]") {
8080
Fetch(service: "b") {
8181
{
8282
... on Book {
@@ -457,8 +457,10 @@ fn simple_mismatch_between_union_fields() -> Result<(), Box<dyn Error>> {
457457
{
458458
"kind": "Flatten",
459459
"path": [
460-
"users",
461-
"@"
460+
{
461+
"Field": "users"
462+
},
463+
"List"
462464
],
463465
"node": {
464466
"kind": "Fetch",
@@ -689,8 +691,10 @@ fn nested_internal_mismatch_between_fields() -> Result<(), Box<dyn Error>> {
689691
{
690692
"kind": "Flatten",
691693
"path": [
692-
"users",
693-
"@"
694+
{
695+
"Field": "users"
696+
},
697+
"List"
694698
],
695699
"node": {
696700
"kind": "Fetch",
@@ -1088,8 +1092,10 @@ fn deeply_nested_internal_mismatch_between_fields() -> Result<(), Box<dyn Error>
10881092
{
10891093
"kind": "Flatten",
10901094
"path": [
1091-
"users",
1092-
"@"
1095+
{
1096+
"Field": "users"
1097+
},
1098+
"List"
10931099
],
10941100
"node": {
10951101
"kind": "Fetch",

lib/query-planner/src/tests/arguments.rs

Lines changed: 106 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,10 @@ fn fed_audit_requires_with_argument_conflict() -> Result<(), Box<dyn Error>> {
8585
{
8686
"kind": "Flatten",
8787
"path": [
88-
"products",
89-
"@"
88+
{
89+
"Field": "products"
90+
},
91+
"List"
9092
],
9193
"node": {
9294
"kind": "Fetch",
@@ -252,8 +254,10 @@ fn requires_arguments_deeply_nested_requires() -> Result<(), Box<dyn Error>> {
252254
{
253255
"kind": "Flatten",
254256
"path": [
255-
"feed",
256-
"@"
257+
{
258+
"Field": "feed"
259+
},
260+
"List"
257261
],
258262
"node": {
259263
"kind": "Fetch",
@@ -281,10 +285,14 @@ fn requires_arguments_deeply_nested_requires() -> Result<(), Box<dyn Error>> {
281285
{
282286
"kind": "Flatten",
283287
"path": [
284-
"feed",
285-
"@",
286-
"_internal_qp_alias_0",
287-
"@"
288+
{
289+
"Field": "feed"
290+
},
291+
"List",
292+
{
293+
"Field": "_internal_qp_alias_0"
294+
},
295+
"List"
288296
],
289297
"node": {
290298
"kind": "Fetch",
@@ -312,8 +320,10 @@ fn requires_arguments_deeply_nested_requires() -> Result<(), Box<dyn Error>> {
312320
{
313321
"kind": "Flatten",
314322
"path": [
315-
"feed",
316-
"@"
323+
{
324+
"Field": "feed"
325+
},
326+
"List"
317327
],
318328
"node": {
319329
"kind": "Fetch",
@@ -466,8 +476,10 @@ fn requires_arguments_deeply_nested_requires_with_variable() -> Result<(), Box<d
466476
{
467477
"kind": "Flatten",
468478
"path": [
469-
"feed",
470-
"@"
479+
{
480+
"Field": "feed"
481+
},
482+
"List"
471483
],
472484
"node": {
473485
"kind": "Fetch",
@@ -498,10 +510,14 @@ fn requires_arguments_deeply_nested_requires_with_variable() -> Result<(), Box<d
498510
{
499511
"kind": "Flatten",
500512
"path": [
501-
"feed",
502-
"@",
503-
"_internal_qp_alias_0",
504-
"@"
513+
{
514+
"Field": "feed"
515+
},
516+
"List",
517+
{
518+
"Field": "_internal_qp_alias_0"
519+
},
520+
"List"
505521
],
506522
"node": {
507523
"kind": "Fetch",
@@ -529,8 +545,10 @@ fn requires_arguments_deeply_nested_requires_with_variable() -> Result<(), Box<d
529545
{
530546
"kind": "Flatten",
531547
"path": [
532-
"feed",
533-
"@"
548+
{
549+
"Field": "feed"
550+
},
551+
"List"
534552
],
535553
"node": {
536554
"kind": "Fetch",
@@ -694,8 +712,10 @@ fn requires_arguments_deeply_nested_requires_with_variables_and_fragments(
694712
{
695713
"kind": "Flatten",
696714
"path": [
697-
"feed",
698-
"@"
715+
{
716+
"Field": "feed"
717+
},
718+
"List"
699719
],
700720
"node": {
701721
"kind": "Fetch",
@@ -726,10 +746,14 @@ fn requires_arguments_deeply_nested_requires_with_variables_and_fragments(
726746
{
727747
"kind": "Flatten",
728748
"path": [
729-
"feed",
730-
"@",
731-
"_internal_qp_alias_0",
732-
"@"
749+
{
750+
"Field": "feed"
751+
},
752+
"List",
753+
{
754+
"Field": "_internal_qp_alias_0"
755+
},
756+
"List"
733757
],
734758
"node": {
735759
"kind": "Fetch",
@@ -757,8 +781,10 @@ fn requires_arguments_deeply_nested_requires_with_variables_and_fragments(
757781
{
758782
"kind": "Flatten",
759783
"path": [
760-
"feed",
761-
"@"
784+
{
785+
"Field": "feed"
786+
},
787+
"List"
762788
],
763789
"node": {
764790
"kind": "Fetch",
@@ -904,7 +930,9 @@ fn multiple_requires_with_args_that_conflicts() -> Result<(), Box<dyn Error>> {
904930
{
905931
"kind": "Flatten",
906932
"path": [
907-
"test"
933+
{
934+
"Field": "test"
935+
}
908936
],
909937
"node": {
910938
"kind": "Fetch",
@@ -935,7 +963,9 @@ fn multiple_requires_with_args_that_conflicts() -> Result<(), Box<dyn Error>> {
935963
{
936964
"kind": "Flatten",
937965
"path": [
938-
"test"
966+
{
967+
"Field": "test"
968+
}
939969
],
940970
"node": {
941971
"kind": "Fetch",
@@ -968,7 +998,9 @@ fn multiple_requires_with_args_that_conflicts() -> Result<(), Box<dyn Error>> {
968998
{
969999
"kind": "Flatten",
9701000
"path": [
971-
"test"
1001+
{
1002+
"Field": "test"
1003+
}
9721004
],
9731005
"node": {
9741006
"kind": "Fetch",
@@ -1111,7 +1143,9 @@ fn multiple_plain_field_and_requires_with_args_that_conflicts() -> Result<(), Bo
11111143
{
11121144
"kind": "Flatten",
11131145
"path": [
1114-
"test"
1146+
{
1147+
"Field": "test"
1148+
}
11151149
],
11161150
"node": {
11171151
"kind": "Fetch",
@@ -1142,7 +1176,9 @@ fn multiple_plain_field_and_requires_with_args_that_conflicts() -> Result<(), Bo
11421176
{
11431177
"kind": "Flatten",
11441178
"path": [
1145-
"test"
1179+
{
1180+
"Field": "test"
1181+
}
11461182
],
11471183
"node": {
11481184
"kind": "Fetch",
@@ -1175,7 +1211,9 @@ fn multiple_plain_field_and_requires_with_args_that_conflicts() -> Result<(), Bo
11751211
{
11761212
"kind": "Flatten",
11771213
"path": [
1178-
"test"
1214+
{
1215+
"Field": "test"
1216+
}
11791217
],
11801218
"node": {
11811219
"kind": "Fetch",
@@ -1298,7 +1336,9 @@ fn multiple_plain_field_and_requires_with_args_that_does_not_conflicts_should_me
12981336
{
12991337
"kind": "Flatten",
13001338
"path": [
1301-
"test"
1339+
{
1340+
"Field": "test"
1341+
}
13021342
],
13031343
"node": {
13041344
"kind": "Fetch",
@@ -1326,7 +1366,9 @@ fn multiple_plain_field_and_requires_with_args_that_does_not_conflicts_should_me
13261366
{
13271367
"kind": "Flatten",
13281368
"path": [
1329-
"test"
1369+
{
1370+
"Field": "test"
1371+
}
13301372
],
13311373
"node": {
13321374
"kind": "Fetch",
@@ -1441,7 +1483,9 @@ fn simple_requires_arguments() -> Result<(), Box<dyn Error>> {
14411483
{
14421484
"kind": "Flatten",
14431485
"path": [
1444-
"test"
1486+
{
1487+
"Field": "test"
1488+
}
14451489
],
14461490
"node": {
14471491
"kind": "Fetch",
@@ -1469,7 +1513,9 @@ fn simple_requires_arguments() -> Result<(), Box<dyn Error>> {
14691513
{
14701514
"kind": "Flatten",
14711515
"path": [
1472-
"test"
1516+
{
1517+
"Field": "test"
1518+
}
14731519
],
14741520
"node": {
14751521
"kind": "Fetch",
@@ -2048,7 +2094,9 @@ fn arguments_variables_mixed() -> Result<(), Box<dyn Error>> {
20482094
{
20492095
"kind": "Flatten",
20502096
"path": [
2051-
"secondProduct"
2097+
{
2098+
"Field": "secondProduct"
2099+
}
20522100
],
20532101
"node": {
20542102
"kind": "Fetch",
@@ -2076,7 +2124,9 @@ fn arguments_variables_mixed() -> Result<(), Box<dyn Error>> {
20762124
{
20772125
"kind": "Flatten",
20782126
"path": [
2079-
"secondProduct"
2127+
{
2128+
"Field": "secondProduct"
2129+
}
20802130
],
20812131
"node": {
20822132
"kind": "Fetch",
@@ -2104,7 +2154,9 @@ fn arguments_variables_mixed() -> Result<(), Box<dyn Error>> {
21042154
{
21052155
"kind": "Flatten",
21062156
"path": [
2107-
"firstProduct"
2157+
{
2158+
"Field": "firstProduct"
2159+
}
21082160
],
21092161
"node": {
21102162
"kind": "Fetch",
@@ -2132,7 +2184,9 @@ fn arguments_variables_mixed() -> Result<(), Box<dyn Error>> {
21322184
{
21332185
"kind": "Flatten",
21342186
"path": [
2135-
"firstProduct"
2187+
{
2188+
"Field": "firstProduct"
2189+
}
21362190
],
21372191
"node": {
21382192
"kind": "Fetch",
@@ -2165,8 +2219,12 @@ fn arguments_variables_mixed() -> Result<(), Box<dyn Error>> {
21652219
{
21662220
"kind": "Flatten",
21672221
"path": [
2168-
"secondProduct",
2169-
"category"
2222+
{
2223+
"Field": "secondProduct"
2224+
},
2225+
{
2226+
"Field": "category"
2227+
}
21702228
],
21712229
"node": {
21722230
"kind": "Fetch",
@@ -2194,8 +2252,12 @@ fn arguments_variables_mixed() -> Result<(), Box<dyn Error>> {
21942252
{
21952253
"kind": "Flatten",
21962254
"path": [
2197-
"firstProduct",
2198-
"category"
2255+
{
2256+
"Field": "firstProduct"
2257+
},
2258+
{
2259+
"Field": "category"
2260+
}
21992261
],
22002262
"node": {
22012263
"kind": "Fetch",

0 commit comments

Comments
 (0)