Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,18 @@ public override void ConfigureServices(IServiceCollection services)
services.AddScoped<IContentTypePartDefinitionDisplayDriver, ContentReadTimePartSettingsDisplayDriver>();
services.AddDataMigration<ContentReadTimeMigrations>();
services.AddScoped<IContentReadTimeCalculator, ContentReadTimeCalculator>();
}
}

// Register GraphQL type for ContentReadTimePart to enable GraphQL queries
/// <summary>
/// Registers GraphQL types for the Content Read Time module.
/// </summary>
[RequireFeatures("OrchardCore.Apis.GraphQL")]
public sealed class GraphQLStartup : StartupBase
{
/// <inheritdoc />
public override void ConfigureServices(IServiceCollection services)
{
services.AddObjectGraphType<ContentReadTimePart, ContentReadTimePartQueryObjectType>();
}
}
2 changes: 1 addition & 1 deletion tests/ContentReadTimeStartupTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public void ConfigureServices_RegistersGraphQLObjectType()
{
// Arrange
var services = new ServiceCollection();
var startup = new Startup();
var startup = new GraphQLStartup();

// Act
startup.ConfigureServices(services);
Expand Down