GraphHealthChecks 2.0.1
dotnet add package GraphHealthChecks --version 2.0.1
NuGet\Install-Package GraphHealthChecks -Version 2.0.1
<PackageReference Include="GraphHealthChecks" Version="2.0.1" />
paket add GraphHealthChecks --version 2.0.1
#r "nuget: GraphHealthChecks, 2.0.1"
// Install GraphHealthChecks as a Cake Addin
#addin nuget:?package=GraphHealthChecks&version=2.0.1
// Install GraphHealthChecks as a Cake Tool
#tool nuget:?package=GraphHealthChecks&version=2.0.1
GraphHealthChecks
Graph Health Checks for HotChocolate.
The purpose of this middleware is to provide feedback in regards to the health of the schema.
Note
There appears to be a compatibility issue for projects targeting .NET 7 and assembly Assembly Microsoft.Extensions.Hosting, Version=7.0.0.0
and more specifically OptionsBuilderExtensions.ValidateOnStart
resulting in error:
The call is ambiguous between the following methods or properties: 'Microsoft.Extensions.DependencyInjection.OptionsBuilderExtensions.ValidateOnStart<TOptions>(Microsoft.Extensions.Options.OptionsBuilder<TOptions>)' and 'Microsoft.Extensions.DependencyInjection.OptionsBuilderExtensions.ValidateOnStart<TOptions>(Microsoft.Extensions.Options.OptionsBuilder<TOptions>)'
Until resolved please consider using a previous version of the package targeting .NET 7.
Usage
Locate the services registration and append one of:
.AddGraphHealthWithNoLogger
- use when no logging is required.AddGraphHealthWithILogger
- use when the ILogger provider is available.AddGraphHealthWithILoggerFactory
- use when the ILoggerFactory provider is available
⚠️ Bear in mind that IHealthChecksBuilder
needs to be appended before any of the aforementioned.
ex.
// Startup.cs
public void ConfigureServices(IServiceCollection services)
{
// ...
services
.AddHealthChecks()
.AddGraphHealthWithILogger();
// ...
}
📝 If further customization is required, consider wiring up any of the factories manually or use the GraphHealthCheck
class itself as required.
If separate schemas are present, multiple registrations can be done for each schema.
ex.
// Startup.cs
public void ConfigureServices(IServiceCollection services)
{
// ...
services
.AddHealthChecks()
.AddGraphHealthWithILogger(healthName: "health1", schemaName: "schema1")
.AddGraphHealthWithILogger(healthName: "health2", schemaName: "schema2");
// ...
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- HotChocolate.Execution (>= 13.7.0)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 8.0.0)
-
net8.0
- HotChocolate.Execution (>= 13.7.0)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.