+0
Daily
5,984
stars
944
forks
162
watchers
2,680
prs
1,805
issues
140
releases
README
GraphQL for .NET !Size !Activity !Activity !Activity | :heart: Become a backer! :heart: | | |-|-| This is an implementation of GraphQL, a query language and execution engine originally created by Facebook in 2012, in .NET. The GraphQL specification is now being developed and maintained by the GraphQL Foundation, established in 2019 to support the GraphQL ecosystem. You can also find the specification's source and discussions on GitHub at graphql/graphql-spec. This project uses a lexer/parser originally written by Marek Magdziak and released with a MIT license. Thank you Marek! Provides the following packages: | Package | Downloads | NuGet Latest | |------------------------|---------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------| | GraphQL | | | | GraphQL.SystemTextJson | | | | GraphQL.NewtonsoftJson | | | | GraphQL.MemoryCache | | | | GraphQL.DataLoader | | | | GraphQL.MicrosoftDI | | | You can get all preview versions from GitHub Packages. Note that GitHub requires authentication to consume the feed. See here. Documentation 1. http://graphql-dotnet.github.io - documentation site that is built from the docs folder in the master branch. 2. https://graphql.org/learn - learn about GraphQL, how it works, and how to use it. Debugging All packages generated from this repository come with embedded pdb and support Source Link. If you are having difficulty understanding how the code works or have encountered an error, then it is just enough to enable Source Link in your IDE settings. Then you can debug GraphQL.NET source code as if it were part of your project. Installation 1. GraphQL.NET engine This is the main package, the heart of the repository in which you can find all the necessary classes for GraphQL request processing. dotnet add package GraphQL 2. Serialization For serialized results, you'll need an IGraphQLSerializer implementation. We provide several serializers (or you can bring your own). dotnet add package GraphQL.SystemTextJson dotnet add package GraphQL.NewtonsoftJson Note: You can use GraphQL.NewtonsoftJson with .NET Core 3+, just be aware it lacks async writing capabilities so writing to an ASP.NET Core 3.0 HttpResponse.Body will require you to set AllowSynchronousIO to true as per this announcement; which isn't recommended. 3. Document Caching The recommended way to setup caching layer (for caching of parsed GraphQL documents) is to
Top issues
#3757Rewrite `ObjectExtensions.ToObject` with source generator35 comments · 2023-11-04#1619Discussion: GraphQL Spec Compliance Test26 comments · 2020-03-19#2164It should be simple to walk a query tree without resolving it, but it isnt25 comments · 2021-01-12#2406Add sample to documentation for custom validation rules22 comments · 2021-03-17#3732Roslyn analyzers 14 comments · 2023-10-13#2797Change 'double registration' so one registration pulls from the other [Discuss]13 comments · 2021-12-24#3823Ensure input object fields default don't conflict with source members default12 comments · 2023-12-14#3088Add/Expose GetSubFields<T>() on IResolveFieldContext to allow getting sub-fields for interfaces10 comments · 2022-04-15
Discussions
#4419How to report a security vulnerability?1 comments · 2026-04-09#4222Altair Dashboard Integration With DevOneBox1 comments · 2025-11-24#4144Auto generation of Schema with interfaces/unions1 comments · 2025-04-04#4141Suppressing certain input validation errors?1 comments · 2025-03-24#4136Parallel Calls. ResolveAsync vs Resolve1 comments · 2025-03-14#4123How to create a mapped input type with an extra (computed) field witch did not exists on the CLR type?1 comments · 2025-02-11#4122Get response as object instead of JSON1 comments · 2025-02-10#4115Is there a built-in mechanism to prevent cycles when the schema is generated?1 comments · 2025-01-15
Latest release
8.8.5 8.8.5 2026-08-18What's Changed Clarify DataLoader DI setup and listener behavior by @yuliuyi717-ux in https://github.com/graphql-dotnet/graphql-dotnet/pull/4385 Fix handling of directive arguments with default values by @jbellenger in https://github.com/graphql-dotnet/graphql-dotnet/pull/4437 Fix self-referencing input type default values throwing circular dependency error by @Shane32 with @Copilot in https://github.com/graphql-dotnet/graphql-dotnet/pull/4445 Fix recursively referenced input object not initializing all field default values by @Shane32 in https://github.com/graphql-dotnet/graphql-dotne