.net 5.0 hotchocolate graphql 服务器版本 11 架构拼接在哪里?
.net 5.0 hotchocolate graphql server version 11 where is schema stiching?
正在努力跟进Hotchocolate ChilliCream blog
基本 GraphQl 服务器运行正常。但是,当我按照博客中的说明添加架构拼接时,无法构建项目。我的包裹参考如下;
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="GraphQL.Server.Ui.Voyager" Version="4.4.1" />
<PackageReference Include="HotChocolate.Abstractions" Version="11.0.9" />
<PackageReference Include="HotChocolate.AspNetCore" Version="11.0.9" />
<PackageReference Include="HotChocolate.Data.EntityFramework" Version="11.0.9" />
<PackageReference Include="HotChocolate.Stitching" Version="11.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="5.0.2" />
</ItemGroup>
并尝试添加
services.AddStitchedSchema(builder => builder
.AddSchemaFromHttp("messages")
.AddSchemaFromHttp("users")
.AddSchemaFromHttp("analytics"));
发生以下构建错误;
Severity Code Description Project File Line Suppression State
Error CS1061 'IServiceCollection' does not contain a definition for 'AddStitchedSchema' and no accessible extension method 'AddStitchedSchema' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?) GraphQL.WebApi C:\github\.net5.0_graphql_hotchocolate\GraphQL.WebApi\Startup.cs 46 Active
如何在这个项目中添加模式拼接?
模式构建器已合并为一个。
你可以做到
services
.AddGraphQLServer()
.AddRemoteSchema("messages")
.AddRemoteSchema("users")
此 PR 是 WIP 文档:
https://github.com/ChilliCream/hotchocolate/pull/2780
正在努力跟进Hotchocolate ChilliCream blog
基本 GraphQl 服务器运行正常。但是,当我按照博客中的说明添加架构拼接时,无法构建项目。我的包裹参考如下;
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="GraphQL.Server.Ui.Voyager" Version="4.4.1" />
<PackageReference Include="HotChocolate.Abstractions" Version="11.0.9" />
<PackageReference Include="HotChocolate.AspNetCore" Version="11.0.9" />
<PackageReference Include="HotChocolate.Data.EntityFramework" Version="11.0.9" />
<PackageReference Include="HotChocolate.Stitching" Version="11.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="5.0.2" />
</ItemGroup>
并尝试添加
services.AddStitchedSchema(builder => builder
.AddSchemaFromHttp("messages")
.AddSchemaFromHttp("users")
.AddSchemaFromHttp("analytics"));
发生以下构建错误;
Severity Code Description Project File Line Suppression State
Error CS1061 'IServiceCollection' does not contain a definition for 'AddStitchedSchema' and no accessible extension method 'AddStitchedSchema' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?) GraphQL.WebApi C:\github\.net5.0_graphql_hotchocolate\GraphQL.WebApi\Startup.cs 46 Active
如何在这个项目中添加模式拼接?
模式构建器已合并为一个。
你可以做到
services
.AddGraphQLServer()
.AddRemoteSchema("messages")
.AddRemoteSchema("users")
此 PR 是 WIP 文档: https://github.com/ChilliCream/hotchocolate/pull/2780