diff --git a/src/Tgstation.Server.Host/Core/Application.cs b/src/Tgstation.Server.Host/Core/Application.cs index fc201f72cc..aa7753c05c 100644 --- a/src/Tgstation.Server.Host/Core/Application.cs +++ b/src/Tgstation.Server.Host/Core/Application.cs @@ -9,6 +9,7 @@ using Elastic.CommonSchema.Serilog; using HotChocolate.AspNetCore; +using HotChocolate.Subscriptions; using HotChocolate.Types; using Microsoft.AspNetCore.Authentication; @@ -296,7 +297,7 @@ void ConfigureNewtonsoftJsonSerializerSettingsForApi(JsonSerializerSettings sett // configure graphql if (postSetupServices.InternalConfiguration.EnableGraphQL) services - .AddScoped() + .AddScoped() .AddGraphQLServer() .AddAuthorization() .ModifyOptions(options => @@ -311,7 +312,11 @@ void ConfigureNewtonsoftJsonSerializerSettingsForApi(JsonSerializerSettings sett }) #endif .AddMutationConventions() - .AddInMemorySubscriptions() + .AddInMemorySubscriptions( + new SubscriptionOptions + { + TopicBufferCapacity = 1024, // mainly so high for tests, not possible to DoS the server without authentication and some other access to generate messages + }) .AddGlobalObjectIdentification() .AddQueryFieldToMutationPayloads() .ModifyOptions(options =>