Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added better error when root value cannot be created. (#2598)
- Loading branch information
1 parent
5daa147
commit 524d73c
Showing
18 changed files
with
112 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 35 additions & 5 deletions
40
src/HotChocolate/Core/src/Execution/Processing/RootValueResolver.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
src/HotChocolate/Core/src/Execution/Properties/Resources.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
...ocolate/Core/test/Execution.Tests/__snapshots__/CodeFirstTests.CannotCreateRootValue.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"errors": [ | ||
{ | ||
"message": "Unable to create the operation type \u0060QueryPrivateConstructor\u0060 instance. Try adding the following service: \u0060services.AddScoped\u003CHotChocolate.Execution.CodeFirstTests\u002BQueryPrivateConstructor\u003E();\u0060", | ||
"extensions": { | ||
"code": "HC0019", | ||
"operationType": "QueryPrivateConstructor", | ||
"runtimeType": "HotChocolate.Execution.CodeFirstTests\u002BQueryPrivateConstructor" | ||
} | ||
} | ||
] | ||
} |
10 changes: 2 additions & 8 deletions
10
...ate/Core/test/Execution.Tests/__snapshots__/CodeFirstTests.ExecuteExplicitAsyncField.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,10 @@ | ||
{ | ||
"Label": null, | ||
"Path": null, | ||
"Data": { | ||
"data": { | ||
"dog": { | ||
"names": [ | ||
"a", | ||
"b" | ||
] | ||
} | ||
}, | ||
"Errors": null, | ||
"Extensions": null, | ||
"ContextData": null, | ||
"HasNext": null | ||
} | ||
} |
10 changes: 2 additions & 8 deletions
10
...ate/Core/test/Execution.Tests/__snapshots__/CodeFirstTests.ExecuteImplicitAsyncField.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,7 @@ | ||
{ | ||
"Label": null, | ||
"Path": null, | ||
"Data": { | ||
"data": { | ||
"dog": { | ||
"name2": "b" | ||
} | ||
}, | ||
"Errors": null, | ||
"Extensions": null, | ||
"ContextData": null, | ||
"HasNext": null | ||
} | ||
} |
10 changes: 2 additions & 8 deletions
10
...hocolate/Core/test/Execution.Tests/__snapshots__/CodeFirstTests.ExecuteImplicitField.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,7 @@ | ||
{ | ||
"Label": null, | ||
"Path": null, | ||
"Data": { | ||
"data": { | ||
"dog": { | ||
"name": "a" | ||
} | ||
}, | ||
"Errors": null, | ||
"Extensions": null, | ||
"ContextData": null, | ||
"HasNext": null | ||
} | ||
} |
10 changes: 2 additions & 8 deletions
10
...t/Execution.Tests/__snapshots__/CodeFirstTests.ExecuteImplicitFieldWithNameAttribute.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,7 @@ | ||
{ | ||
"Label": null, | ||
"Path": null, | ||
"Data": { | ||
"data": { | ||
"dog": { | ||
"desc": "desc" | ||
} | ||
}, | ||
"Errors": null, | ||
"Extensions": null, | ||
"ContextData": null, | ||
"HasNext": null | ||
} | ||
} |
10 changes: 2 additions & 8 deletions
10
...ore/test/Execution.Tests/__snapshots__/CodeFirstTests.ExecuteOneFieldQueryWithMethod.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,5 @@ | ||
{ | ||
"Label": null, | ||
"Path": null, | ||
"Data": { | ||
"data": { | ||
"test": "Hello World!" | ||
}, | ||
"Errors": null, | ||
"Extensions": null, | ||
"ContextData": null, | ||
"HasNext": null | ||
} | ||
} |
10 changes: 2 additions & 8 deletions
10
...e/test/Execution.Tests/__snapshots__/CodeFirstTests.ExecuteOneFieldQueryWithProperty.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,5 @@ | ||
{ | ||
"Label": null, | ||
"Path": null, | ||
"Data": { | ||
"data": { | ||
"test": "Hello World!" | ||
}, | ||
"Errors": null, | ||
"Extensions": null, | ||
"ContextData": null, | ||
"HasNext": null | ||
} | ||
} |
10 changes: 2 additions & 8 deletions
10
...Core/test/Execution.Tests/__snapshots__/CodeFirstTests.ExecuteOneFieldQueryWithQuery.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,8 @@ | ||
{ | ||
"Label": null, | ||
"Path": null, | ||
"Data": { | ||
"data": { | ||
"query": [ | ||
"foo", | ||
"bar" | ||
] | ||
}, | ||
"Errors": null, | ||
"Extensions": null, | ||
"ContextData": null, | ||
"HasNext": null | ||
} | ||
} |
10 changes: 2 additions & 8 deletions
10
...hocolate/Core/test/Execution.Tests/__snapshots__/CodeFirstTests.ExecuteWithInterface.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,7 @@ | ||
{ | ||
"Label": null, | ||
"Path": null, | ||
"Data": { | ||
"data": { | ||
"drink": { | ||
"kind": "BLACK_TEA" | ||
} | ||
}, | ||
"Errors": null, | ||
"Extensions": null, | ||
"ContextData": null, | ||
"HasNext": null | ||
} | ||
} |
Oops, something went wrong.