Mil*_*jus 5 c# graphql asp.net-core
我只是在学习 .NET Core 和 GraphQL,无法从网络上获得一个示例(我已经尝试了十几个)来工作。他们都在使用这个库https://graphql-dotnet.github.io,每次我尝试使用有效的 GraphQL 查询访问端点时,我都会得到以下响应:
{
"errors": [
{
"message": "Unmapped selection Field",
"extensions": {
"code": "EXECUTION_ERROR"
}
}
]
}
Run Code Online (Sandbox Code Playgroud)
示例之一:https : //github.com/mmacneil/ASPNetCoreGraphQL
我似乎找不到任何谷歌搜索该错误的内容,并且有关该错误的文档没有太多帮助。我希望有人与图书馆合作并遇到同样的问题。
这是在 GraphQLController 中执行查询的结果的错误:
InnerException = {GraphQL.ExecutionError: Unmapped selection Field
at GraphQL.Language.CoreToVanillaConverter.Selection(ASTNode source)
at GraphQL.Language.CoreToVanillaConverter.SelectionSet(GraphQLSelectionSet source)
at GraphQL.Language.CoreToVanillaConverter.Operation(GraphQLOperationDefinition source)
at GraphQL.Language.CoreToVanillaConverter.AddDefinitions(GraphQLDocument source, Document target)
at GraphQL.Language.CoreToVanillaConverter.Convert(String body, GraphQLDocument source)
at GraphQL.Execution.GraphQLDocumentBuilder.Build(String body)
at GraphQL.DocumentExecuter.ExecuteAsync(ExecutionOptions options)
Run Code Online (Sandbox Code Playgroud)
这也是我在这里的第一篇文章。如果您需要更多信息,请告诉我。
我怀疑你有一个GraphQL-Parser NuGet 包的错误副本。我也遇到了类似的问题,并已将其报告给GraphQL-Parser问题跟踪器。
尝试以下操作(假设是 Visual Studio 2017):
dotnet nuget locals http-cache --clear或dotnet nuget locals all --clear从命令提示符清除 NuGet 包缓存。| 归档时间: |
|
| 查看次数: |
766 次 |
| 最近记录: |