Soenneker.GraphQl.Schema.Download
4.0.76
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.GraphQl.Schema.Download --version 4.0.76
NuGet\Install-Package Soenneker.GraphQl.Schema.Download -Version 4.0.76
<PackageReference Include="Soenneker.GraphQl.Schema.Download" Version="4.0.76" />
<PackageVersion Include="Soenneker.GraphQl.Schema.Download" Version="4.0.76" />
<PackageReference Include="Soenneker.GraphQl.Schema.Download" />
paket add Soenneker.GraphQl.Schema.Download --version 4.0.76
#r "nuget: Soenneker.GraphQl.Schema.Download, 4.0.76"
#:package Soenneker.GraphQl.Schema.Download@4.0.76
#addin nuget:?package=Soenneker.GraphQl.Schema.Download&version=4.0.76
#tool nuget:?package=Soenneker.GraphQl.Schema.Download&version=4.0.76
Soenneker.GraphQl.Schema.Download
Downloads a GraphQL server's introspection response and verifies that it contains a usable schema payload. The returned JSON can be archived as-is or passed to an introspection-to-SDL converter.
Installation
dotnet add package Soenneker.GraphQl.Schema.Download
Registration
using Microsoft.Extensions.DependencyInjection;
using Soenneker.GraphQl.Schema.Download.Abstract;
using Soenneker.GraphQl.Schema.Download.Registrars;
services.AddGraphQlSchemaDownloadUtilAsScoped();
IGraphQlSchemaDownloadUtil downloader =
serviceProvider.GetRequiredService<IGraphQlSchemaDownloadUtil>();
Scoped registration keeps the utility disposable with its consuming scope while the underlying HTTP client cache remains a singleton. Singleton utility registration is also available with AddGraphQlSchemaDownloadUtilAsSingleton().
Download a schema
string introspectionJson = await downloader.Download(
"https://api.example.com/graphql",
bearerToken: accessToken,
cancellationToken: cancellationToken);
await File.WriteAllTextAsync("introspection.json", introspectionJson, cancellationToken);
Additional request headers can be supplied when an API uses tenant, version, or API-key headers:
var headers = new Dictionary<string, string>
{
["X-Api-Key"] = apiKey,
["X-Tenant-Id"] = tenantId
};
string introspectionJson = await downloader.Download(endpoint, headers, cancellationToken: cancellationToken);
To use an already configured client, pass it to the overload. The client remains owned by the caller and is not disposed by the downloader:
string introspectionJson = await downloader.Download(httpClient, endpoint, cancellationToken: cancellationToken);
The request is an HTTP POST with the standard introspection query and an application/json body. Non-success HTTP responses throw HttpRequestException; malformed JSON throws JsonException; GraphQL errors, empty responses, and responses without a schema types array throw InvalidOperationException.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Soenneker.Extensions.Object (>= 4.0.4326)
- Soenneker.Utils.HttpClientCache (>= 4.0.2052)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.86 | 0 | 9/4/2026 |
| 4.0.83 | 0 | 9/4/2026 |
| 4.0.82 | 0 | 9/4/2026 |
| 4.0.81 | 0 | 9/4/2026 |
| 4.0.80 | 30 | 9/4/2026 |
| 4.0.79 | 43 | 9/4/2026 |
| 4.0.77 | 43 | 9/4/2026 |
| 4.0.76 | 45 | 9/4/2026 |
| 4.0.75 | 46 | 9/3/2026 |
| 4.0.74 | 109 | 9/1/2026 |
| 4.0.73 | 76 | 9/1/2026 |
| 4.0.72 | 76 | 9/1/2026 |
| 4.0.71 | 110 | 8/31/2026 |
| 4.0.70 | 86 | 8/31/2026 |
| 4.0.69 | 126 | 8/30/2026 |
| 4.0.68 | 82 | 8/30/2026 |
| 4.0.67 | 135 | 8/29/2026 |
| 4.0.66 | 81 | 8/29/2026 |
| 4.0.65 | 229 | 8/26/2026 |
| 4.0.64 | 94 | 8/26/2026 |