Feather.GraphQL.Linq.Abstractions
0.1.1-alpha.13
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
<PackageReference Include="Feather.GraphQL.Linq.Abstractions" Version="0.1.1-alpha.13" />
<PackageVersion Include="Feather.GraphQL.Linq.Abstractions" Version="0.1.1-alpha.13" />
<PackageReference Include="Feather.GraphQL.Linq.Abstractions" />
paket add Feather.GraphQL.Linq.Abstractions --version 0.1.1-alpha.13
#r "nuget: Feather.GraphQL.Linq.Abstractions, 0.1.1-alpha.13"
#:package Feather.GraphQL.Linq.Abstractions@0.1.1-alpha.13
#addin nuget:?package=Feather.GraphQL.Linq.Abstractions&version=0.1.1-alpha.13&prerelease
#tool nuget:?package=Feather.GraphQL.Linq.Abstractions&version=0.1.1-alpha.13&prerelease
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.
Useful Links
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 | 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
- JetBrains.Annotations (>= 2025.2.4)
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 |