Do not enable BananaCakePop without HostApiDocumentation

This commit is contained in:
Jordan Dominion
2024-09-15 11:06:01 -04:00
parent 0166adc53f
commit 0c0bf2891c
@@ -652,12 +652,16 @@ namespace Tgstation.Server.Host.Core
if (internalConfiguration.EnableGraphQL)
{
logger.LogWarning("Enabling GraphQL. This API is experimental and breaking changes may occur at any time!");
var gqlOptions = new GraphQLServerOptions
{
EnableBatching = true,
};
gqlOptions.Tool.Enable = generalConfiguration.HostApiDocumentation;
endpoints
.MapGraphQL(Routes.GraphQL)
.WithOptions(new GraphQLServerOptions
{
EnableBatching = true,
});
.WithOptions(gqlOptions);
}
});