Feather.GraphQL.Linq.Abstractions 0.1.1-alpha.13

This is a prerelease version of Feather.GraphQL.Linq.Abstractions.
dotnet add package Feather.GraphQL.Linq.Abstractions --version 0.1.1-alpha.13
                    
NuGet\Install-Package Feather.GraphQL.Linq.Abstractions -Version 0.1.1-alpha.13
                    
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="Feather.GraphQL.Linq.Abstractions" Version="0.1.1-alpha.13" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Feather.GraphQL.Linq.Abstractions" Version="0.1.1-alpha.13" />
                    
Directory.Packages.props
<PackageReference Include="Feather.GraphQL.Linq.Abstractions" />
                    
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 Feather.GraphQL.Linq.Abstractions --version 0.1.1-alpha.13
                    
#r "nuget: Feather.GraphQL.Linq.Abstractions, 0.1.1-alpha.13"
                    
#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 Feather.GraphQL.Linq.Abstractions@0.1.1-alpha.13
                    
#: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=Feather.GraphQL.Linq.Abstractions&version=0.1.1-alpha.13&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Feather.GraphQL.Linq.Abstractions&version=0.1.1-alpha.13&prerelease
                    
Install as a Cake Tool

Feather.GraphQL

A GraphQL Client for .NET Standard over HTTP.

Specification

The Library will try to follow the following standards and documents:

Usage

This library provides various extensions and utilities to extend base .NET networking functionality with GraphQL concepts.

If you're familiar with the System.Text.Json extensions to HttpClient, this was designed to be familiar!

Create a GraphQLRequest:

Simple Request:
var heroRequest = new GraphQLRequest {
    Query = """
    {
        hero {
            name
        }
    }
    """
};
OperationName and Variables Request:

Be careful when using byte[] in your variables object, as most JSON serializers will treat that as binary data.

If you really need to send a list of bytes with a byte[] as a source, then convert it to a List<byte> first, which will tell the serializer to output a list of numbers instead of a base64-encoded string.

Execute Query/Mutation

Assuming the schema:

type Query
{
    person: Person
}

type Person
{
    name: String!
    filmConnection: FilmConnection!
}

type FilmConnection {
    films: [FilmContent!]
}

type FilmContent {
    title: String!
}
var personAndFilmsRequest = new GraphQLRequest {
    Query ="""
    query PersonAndFilms($id: ID) {
        person(id: $id) {
            name
            filmConnection {
                films {
                    title
                }
            }
        }
    }
    """,
    OperationName = "PersonAndFilms",
    Variables = new {
        id = "cGVvcGxlOjE="
    }
};

// Use an HTTP client from somewhere (DI, Factory, etc)
var httpResponse = await httpClient.SendGraphQLQueryAsync(personAndFilmsRequest);

// Read the response headers/content similar to string or JSON data
var graphQLResponse = httpResponse.Content.ReadAsGraphQLAsync<PersonResponse>();

// Get the information you need out of the response
var personName = graphQLResponse.Data.Person.Name;

Note that the field in the GraphQL response which gets deserialized into the response object is the data field.

A common mistake is to try to directly use the PersonType class as response type (because thats the thing you actually want to query), but the returned response object contains a property person containing a PersonType object (like the ResponseType modelled above).

Syntax Highlighting for GraphQL strings in IDEs

.NET 7.0 introduced the StringSyntaxAttribute to have a unified way of telling what data is expected in a given string or ReadOnlySpan<char>. IDEs like Visual Studio and Rider can then use this to provide syntax highlighting and checking.

From v6.0.4 on all GraphQL string parameters in this library are decorated with the [StringSyntax("GraphQL")] attribute.

Currently, there is no native support for GraphQL formatting and syntax highlighting in Visual Studio, but the GraphQLTools Extension provides that for you.

For Rider, JetBrains provides a Plugin, too.

To leverage syntax highlighting in variable declarations, use the GraphQLQuery class.

Blazor WebAssembly Limitations

Blazor WebAssembly differs from other platforms as it does not support all features of other .NET runtime implementations. For instance, the following WebSocket options properties are not supported and will not be set:

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
0.1.1-alpha.13 87 8/19/2026 0.1.1-alpha.13 is deprecated because it is no longer maintained.