Soenneker.GraphQl.Schema.Download
4.0.112
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.GraphQl.Schema.Download --version 4.0.112
NuGet\Install-Package Soenneker.GraphQl.Schema.Download -Version 4.0.112
<PackageReference Include="Soenneker.GraphQl.Schema.Download" Version="4.0.112" />
<PackageVersion Include="Soenneker.GraphQl.Schema.Download" Version="4.0.112" />
<PackageReference Include="Soenneker.GraphQl.Schema.Download" />
paket add Soenneker.GraphQl.Schema.Download --version 4.0.112
#r "nuget: Soenneker.GraphQl.Schema.Download, 4.0.112"
#:package Soenneker.GraphQl.Schema.Download@4.0.112
#addin nuget:?package=Soenneker.GraphQl.Schema.Download&version=4.0.112
#tool nuget:?package=Soenneker.GraphQl.Schema.Download&version=4.0.112
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.4364)
- Soenneker.Utils.HttpClientCache (>= 4.0.2080)
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.114 | 0 | 9/16/2026 |
| 4.0.113 | 39 | 9/15/2026 |
| 4.0.112 | 39 | 9/15/2026 |
| 4.0.111 | 131 | 9/13/2026 |
| 4.0.110 | 51 | 9/13/2026 |
| 4.0.109 | 46 | 9/13/2026 |
| 4.0.108 | 48 | 9/13/2026 |
| 4.0.107 | 75 | 9/13/2026 |
| 4.0.106 | 84 | 9/13/2026 |
| 4.0.105 | 57 | 9/13/2026 |
| 4.0.104 | 86 | 9/12/2026 |
| 4.0.103 | 54 | 9/12/2026 |
| 4.0.102 | 53 | 9/12/2026 |
| 4.0.101 | 139 | 9/9/2026 |
| 4.0.100 | 85 | 9/9/2026 |
| 4.0.99 | 125 | 9/9/2026 |
| 4.0.98 | 129 | 9/8/2026 |
| 4.0.97 | 115 | 9/8/2026 |
| 4.0.96 | 96 | 9/8/2026 |
| 4.0.95 | 120 | 9/8/2026 |