Soenneker.GraphQl.Schema.Download
4.0.74
Prefix Reserved
dotnet add package Soenneker.GraphQl.Schema.Download --version 4.0.74
NuGet\Install-Package Soenneker.GraphQl.Schema.Download -Version 4.0.74
<PackageReference Include="Soenneker.GraphQl.Schema.Download" Version="4.0.74" />
<PackageVersion Include="Soenneker.GraphQl.Schema.Download" Version="4.0.74" />
<PackageReference Include="Soenneker.GraphQl.Schema.Download" />
paket add Soenneker.GraphQl.Schema.Download --version 4.0.74
#r "nuget: Soenneker.GraphQl.Schema.Download, 4.0.74"
#:package Soenneker.GraphQl.Schema.Download@4.0.74
#addin nuget:?package=Soenneker.GraphQl.Schema.Download&version=4.0.74
#tool nuget:?package=Soenneker.GraphQl.Schema.Download&version=4.0.74
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.4325)
- Soenneker.Utils.HttpClientCache (>= 4.0.2051)
- Soenneker.Utils.PooledStringBuilders (>= 4.0.29)
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.74 | 0 | 9/1/2026 |
| 4.0.73 | 31 | 9/1/2026 |
| 4.0.72 | 35 | 9/1/2026 |
| 4.0.71 | 70 | 8/31/2026 |
| 4.0.70 | 49 | 8/31/2026 |
| 4.0.69 | 91 | 8/30/2026 |
| 4.0.68 | 46 | 8/30/2026 |
| 4.0.67 | 100 | 8/29/2026 |
| 4.0.66 | 45 | 8/29/2026 |
| 4.0.65 | 224 | 8/26/2026 |
| 4.0.64 | 87 | 8/26/2026 |
| 4.0.63 | 85 | 8/26/2026 |
| 4.0.62 | 82 | 8/26/2026 |
| 4.0.61 | 135 | 8/22/2026 |
| 4.0.60 | 99 | 8/22/2026 |
| 4.0.59 | 153 | 8/19/2026 |
| 4.0.58 | 121 | 8/18/2026 |
| 4.0.57 | 184 | 8/13/2026 |
| 4.0.56 | 100 | 8/12/2026 |
| 4.0.55 | 161 | 8/12/2026 |