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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.GraphQl.Schema.Download" Version="4.0.74" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.GraphQl.Schema.Download" Version="4.0.74" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.GraphQl.Schema.Download" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.GraphQl.Schema.Download --version 4.0.74
                    
#r "nuget: Soenneker.GraphQl.Schema.Download, 4.0.74"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.GraphQl.Schema.Download@4.0.74
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.GraphQl.Schema.Download&version=4.0.74
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.GraphQl.Schema.Download&version=4.0.74
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
Loading failed