Skip to content

Commit 38824a7

Browse files
[Fusion] Properly output operation plan node type (#8520)
1 parent 8f76d7f commit 38824a7

File tree

56 files changed

+121
-7
lines changed

Some content is hidden

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

56 files changed

+121
-7
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,14 @@ private static void WriteIntrospectionNode(
176176
{
177177
jsonWriter.WriteStartObject();
178178
jsonWriter.WriteNumber("id", node.Id);
179+
jsonWriter.WriteString("type", "Introspection");
179180

180181
jsonWriter.WriteStartArray("selections");
181182

182183
foreach (var selection in node.Selections)
183184
{
184185
jsonWriter.WriteStartObject();
185186
jsonWriter.WriteNumber("id", selection.Id);
186-
jsonWriter.WriteString("type", "Introspection");
187187
jsonWriter.WriteString("responseName", selection.ResponseName);
188188
jsonWriter.WriteString("fieldName", selection.Field.Name);
189189
jsonWriter.WriteEndObject();

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ private static void WriteOperationNode(OperationExecutionNode node, ExecutionNod
3838
{
3939
writer.WriteLine("- id: {0}", node.Id);
4040
writer.Indent();
41+
42+
writer.WriteLine("type: {0}", "Operation");
43+
4144
writer.WriteLine("schema: {0}", node.SchemaName);
4245

4346
writer.WriteLine("operation: >-");
@@ -158,6 +161,8 @@ private static void WriteIntrospectionNode(IntrospectionExecutionNode node, Exec
158161
writer.WriteLine("- id: {0}", node.Id);
159162
writer.Indent();
160163

164+
writer.WriteLine("type: {0}", "Introspection");
165+
161166
writer.WriteLine("selections:");
162167
writer.Indent();
163168
foreach (var selection in node.Selections)

src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Fetch_Schema_Types_Name.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@
7575
"nodes": [
7676
{
7777
"id": 1,
78+
"type": "Introspection",
7879
"selections": [
7980
{
8081
"id": 1,
81-
"type": "Introspection",
8282
"responseName": "__schema",
8383
"fieldName": "__schema"
8484
}

src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Fetch_Specific_Type.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
"nodes": [
1515
{
1616
"id": 1,
17+
"type": "Introspection",
1718
"selections": [
1819
{
1920
"id": 1,
20-
"type": "Introspection",
2121
"responseName": "__type",
2222
"fieldName": "__type"
2323
}

src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Typename_On_Query.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
"nodes": [
1313
{
1414
"id": 1,
15+
"type": "Introspection",
1516
"selections": [
1617
{
1718
"id": 1,
18-
"type": "Introspection",
1919
"responseName": "__typename",
2020
"fieldName": "__typename"
2121
}

src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Typename_On_Query_Skip_False.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
"nodes": [
1313
{
1414
"id": 1,
15+
"type": "Introspection",
1516
"selections": [
1617
{
1718
"id": 1,
18-
"type": "Introspection",
1919
"responseName": "__typename",
2020
"fieldName": "__typename"
2121
}

src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Typename_On_Query_Skip_True.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
"nodes": [
1111
{
1212
"id": 1,
13+
"type": "Introspection",
1314
"selections": [
1415
{
1516
"id": 1,
16-
"type": "Introspection",
1717
"responseName": "__typename",
1818
"fieldName": "__typename"
1919
}

src/HotChocolate/Fusion-vnext/test/Fusion.AspNetCore.Tests/__snapshots__/IntrospectionTests.Typename_On_Query_With_Alias.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
"nodes": [
1313
{
1414
"id": 1,
15+
"type": "Introspection",
1516
"selections": [
1617
{
1718
"id": 1,
18-
"type": "Introspection",
1919
"responseName": "a",
2020
"fieldName": "__typename"
2121
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ operation:
99
hash: 123
1010
nodes:
1111
- id: 1
12+
type: Operation
1213
schema: SUBGRAPH_1
1314
operation: >-
1415
query testQuery_123_1 {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ operation:
1212
hash: 123
1313
nodes:
1414
- id: 1
15+
type: Operation
1516
schema: SUBGRAPH_1
1617
operation: >-
1718
query testQuery_123_1 {

0 commit comments

Comments
 (0)