Skip to content

Commit 18cfa9d

Browse files
committed
feat: adding SubscriptionDocumentExecuter to enable subscriptions
1 parent b2e3520 commit 18cfa9d

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

samples/Samples.Server/Samples.Server.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
</PropertyGroup>
1010

1111
<ItemGroup>
12+
<PackageReference Include="GraphQL.SystemReactive" Version="4.6.1" />
1213
<PackageReference Include="Serilog.AspNetCore" Version="4.0.0" />
1314
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
1415
<PackageReference Include="GraphQL.MicrosoftDI" Version="4.6.1" />

samples/Samples.Server/Startup.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using GraphQL.Server.Ui.GraphiQL;
88
using GraphQL.Server.Ui.Playground;
99
using GraphQL.Server.Ui.Voyager;
10+
using GraphQL.SystemReactive;
1011
using Microsoft.AspNetCore.Builder;
1112
using Microsoft.AspNetCore.Hosting;
1213
using Microsoft.Extensions.Configuration;
@@ -34,6 +35,7 @@ public void ConfigureServices(IServiceCollection services)
3435
services.AddSingleton<IChat, Chat>();
3536

3637
MicrosoftDI.GraphQLBuilderExtensions.AddGraphQL(services)
38+
.AddSubscriptionDocumentExecuter()
3739
.AddServer(true)
3840
.AddSchema<ChatSchema>()
3941
.ConfigureExecution(options =>

samples/Samples.Server/StartupWithRouting.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using GraphQL.Server.Ui.GraphiQL;
88
using GraphQL.Server.Ui.Playground;
99
using GraphQL.Server.Ui.Voyager;
10+
using GraphQL.SystemReactive;
1011
using Microsoft.AspNetCore.Builder;
1112
using Microsoft.AspNetCore.Hosting;
1213
using Microsoft.Extensions.Configuration;
@@ -35,6 +36,7 @@ public void ConfigureServices(IServiceCollection services)
3536
services.AddSingleton<IChat, Chat>();
3637

3738
MicrosoftDI.GraphQLBuilderExtensions.AddGraphQL(services)
39+
.AddSubscriptionDocumentExecuter()
3840
.AddServer(true)
3941
.AddSchema<ChatSchema>()
4042
.ConfigureExecution(options =>

0 commit comments

Comments
 (0)