Skip to content

Commit e3870cb

Browse files
[Fusion] Fix operation plan YAML indentation (#8483)
1 parent fd08b50 commit e3870cb

File tree

46 files changed

+410
-408
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+410
-408
lines changed

src/HotChocolate/Fusion-vnext/src/Fusion.Execution/Execution/Nodes/Serialization/YamlOperationPlanFormatter.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,15 @@ private static void WriteOperation(
112112

113113
writer.WriteLine("- document: >-");
114114
writer.Indent();
115+
writer.Indent();
115116
var reader = new StringReader(plan.Operation.Definition.ToString(indented: true));
116117
var line = reader.ReadLine();
117118
while (line != null)
118119
{
119120
writer.WriteLine(line);
120121
line = reader.ReadLine();
121122
}
123+
writer.Unindent();
122124

123125
if (!string.IsNullOrEmpty(plan.Operation.Name))
124126
{

src/HotChocolate/Fusion-vnext/test/Fusion.Execution.Tests/Planning/__snapshots__/InterfaceTests.Interface_Field.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
operation:
22
- document: >-
3-
query testQuery {
4-
votable {
5-
viewerCanVote
3+
query testQuery {
4+
votable {
5+
viewerCanVote
6+
}
67
}
7-
}
88
name: testQuery
99
hash: 123
1010
nodes:

src/HotChocolate/Fusion-vnext/test/Fusion.Execution.Tests/Planning/__snapshots__/InterfaceTests.Interface_Field_Concrete_Type.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
operation:
22
- document: >-
3-
query testQuery {
4-
votable {
5-
viewerCanVote
6-
... on Discussion {
7-
title
3+
query testQuery {
4+
votable {
5+
viewerCanVote
6+
... on Discussion {
7+
title
8+
}
89
}
910
}
10-
}
1111
name: testQuery
1212
hash: 123
1313
nodes:

src/HotChocolate/Fusion-vnext/test/Fusion.Execution.Tests/Planning/__snapshots__/InterfaceTests.Interface_Field_Concrete_Type_Linked_Field_With_Dependency.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
operation:
22
- document: >-
3-
query testQuery {
4-
votable {
5-
viewerCanVote
6-
... on Discussion {
7-
author {
8-
displayName
9-
id @fusion__requirement
3+
query testQuery {
4+
votable {
5+
viewerCanVote
6+
... on Discussion {
7+
author {
8+
displayName
9+
id @fusion__requirement
10+
}
1011
}
1112
}
1213
}
13-
}
1414
name: testQuery
1515
hash: 123
1616
nodes:

src/HotChocolate/Fusion-vnext/test/Fusion.Execution.Tests/Planning/__snapshots__/InterfaceTests.Interface_Field_Concrete_Type_With_Dependency.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
operation:
22
- document: >-
3-
query testQuery {
4-
votable {
5-
viewerCanVote
6-
... on Discussion {
7-
viewerRating
8-
id @fusion__requirement
3+
query testQuery {
4+
votable {
5+
viewerCanVote
6+
... on Discussion {
7+
viewerRating
8+
id @fusion__requirement
9+
}
910
}
1011
}
11-
}
1212
name: testQuery
1313
hash: 123
1414
nodes:

src/HotChocolate/Fusion-vnext/test/Fusion.Execution.Tests/Planning/__snapshots__/InterfaceTests.Interface_Field_Linked_Field_With_Dependency.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
operation:
22
- document: >-
3-
query testQuery {
4-
authorable {
5-
author {
6-
id
7-
displayName
8-
id @fusion__requirement
3+
query testQuery {
4+
authorable {
5+
author {
6+
id
7+
displayName
8+
id @fusion__requirement
9+
}
910
}
1011
}
11-
}
1212
name: testQuery
1313
hash: 123
1414
nodes:

src/HotChocolate/Fusion-vnext/test/Fusion.Execution.Tests/Planning/__snapshots__/InterfaceTests.Interface_Field_Linked_Field_With_Dependency_Different_Selection_In_Concrete_Type.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
operation:
22
- document: >-
3-
query testQuery {
4-
authorable {
5-
author {
6-
id
7-
displayName
8-
id @fusion__requirement
9-
}
10-
... on Discussion {
3+
query testQuery {
4+
authorable {
115
author {
12-
email
6+
id
7+
displayName
138
id @fusion__requirement
149
}
10+
... on Discussion {
11+
author {
12+
email
13+
id @fusion__requirement
14+
}
15+
}
1516
}
1617
}
17-
}
1818
name: testQuery
1919
hash: 123
2020
nodes:

src/HotChocolate/Fusion-vnext/test/Fusion.Execution.Tests/Planning/__snapshots__/InterfaceTests.Interface_Field_Linked_Field_With_Dependency_Same_Selection_In_Concrete_Type.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
operation:
22
- document: >-
3-
query testQuery {
4-
authorable {
5-
author {
6-
id
7-
displayName
8-
id @fusion__requirement
9-
}
10-
... on Discussion {
3+
query testQuery {
4+
authorable {
115
author {
126
id
137
displayName
148
id @fusion__requirement
159
}
10+
... on Discussion {
11+
author {
12+
id
13+
displayName
14+
id @fusion__requirement
15+
}
16+
}
1617
}
1718
}
18-
}
1919
name: testQuery
2020
hash: 123
2121
nodes:

src/HotChocolate/Fusion-vnext/test/Fusion.Execution.Tests/Planning/__snapshots__/InterfaceTests.Interface_List_Field.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
operation:
22
- document: >-
3-
query testQuery {
4-
votables {
5-
viewerCanVote
3+
query testQuery {
4+
votables {
5+
viewerCanVote
6+
}
67
}
7-
}
88
name: testQuery
99
hash: 123
1010
nodes:

src/HotChocolate/Fusion-vnext/test/Fusion.Execution.Tests/Planning/__snapshots__/InterfaceTests.Interface_List_Field_Concrete_Type.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
operation:
22
- document: >-
3-
query testQuery {
4-
votables {
5-
viewerCanVote
6-
... on Discussion {
7-
title
3+
query testQuery {
4+
votables {
5+
viewerCanVote
6+
... on Discussion {
7+
title
8+
}
89
}
910
}
10-
}
1111
name: testQuery
1212
hash: 123
1313
nodes:

0 commit comments

Comments
 (0)