Graphql 未调用热巧克力图形SQL配置
我有一个问题:Graphql 未调用热巧克力图形SQL配置,graphql,hotchocolate,Graphql,Hotchocolate,我有一个问题: 公共类查询:ObjectType { 受保护的覆盖无效配置(IObjectTypeDescriptor描述符) { Console.WriteLine(“点击配置”); } 公共IQueryable GetDataStories([Service]MicipContext上下文) { 返回context.DataStories; } } 在Startup.cs中: public void配置服务(IServiceCollection服务) { services.AddGraph
公共类查询:ObjectType
{
受保护的覆盖无效配置(IObjectTypeDescriptor描述符)
{
Console.WriteLine(“点击配置”);
}
公共IQueryable GetDataStories([Service]MicipContext上下文)
{
返回context.DataStories;
}
}
在Startup.cs中:
public void配置服务(IServiceCollection服务)
{
services.AddGraphQL(sp=>
{
var schema=schemabilder.New()
.AddDocumentFromString(此.ReadSchema())
.BindResolver(c=>c.To())
.AddServices(sp)
.Create();
返回模式;
}
}
和我的模式图ql:
type Query {
dataStories: [DataStory!]!
}
type DataStory {
id: Int!
title: String!
}
当我使用以下命令调用查询时:
query GetDataStories {
dataStories {
title
}
}
解析程序返回正确,但从未调用过我的配置方法。我做错了什么?不应该在某个时候调用配置吗?发现热巧克力没有在模式优先的项目上添加对分页/排序/筛选的支持。我们先做模式,所以我们必须自己实现它