Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Core
  3. parser

parser

MITC#9.5.1

A lexer and parser for GraphQL in .NET, providing a complete AST model compatible with the GraphQL specification.

GitHubGitHub
219 stars41 forks0 contributors

What is parser?

GraphQL.NET Parser is a .NET library that provides a lexer and parser for GraphQL, along with a complete Abstract Syntax Tree (AST) model. It allows developers to parse, analyze, and manipulate GraphQL queries and schemas programmatically, ensuring compliance with the GraphQL specification.

Target Audience

.NET developers building GraphQL APIs, tools, or integrations who need to parse, validate, or transform GraphQL documents within their applications.

Value Proposition

It offers a high-performance, specification-compliant parsing solution with minimal memory overhead, and is the underlying parser used by the GraphQL.NET project, ensuring reliability and extensive testing.

Overview

A lexer and parser for GraphQL in .NET

Use Cases

Best For

  • Parsing GraphQL queries in .NET server applications
  • Building custom GraphQL tooling or IDEs in .NET
  • Validating GraphQL schema definitions programmatically
  • Transforming or printing GraphQL SDL with custom formatting
  • Debugging GraphQL AST structures during development
  • Integrating GraphQL parsing into .NET-based GraphQL servers

Not Ideal For

  • Projects requiring a full GraphQL server with execution, validation, and subscriptions
  • Teams needing support for GraphQL specifications newer than October 2021
  • Applications that only require simple query parsing without AST manipulation overhead
  • Developers looking for an all-in-one GraphQL solution with built-in HTTP handling

Pros & Cons

Pros

High-Performance Lexing

Uses `ReadOnlyMemory<char>` to minimize managed heap allocations, as highlighted in the Lexer section for efficient token generation.

Spec-Compliant AST Model

Provides a complete Abstract Syntax Tree fully compatible with the GraphQL October 2021 specification, ensuring reliable parsing for standard-compliant documents.

Optimized SDL Printing

SDLPrinter offers asynchronous, non-blocking output with configurable formatting options, allowing flexible Schema Definition Language generation from AST.

Integration with GraphQL.NET

Serves as the core parser for the GraphQL.NET project, backed by extensive testing and verification from multiple data sets.

Cons

No Execution Capabilities

Focuses solely on parsing and AST manipulation, lacking built-in query execution, validation, or subscription features, requiring additional libraries for full GraphQL functionality.

Specification Lag Risk

Adheres to the October 2021 GraphQL spec, which may not include newer language features or corrections, potentially limiting compatibility with evolving GraphQL standards.

AST Complexity Overhead

For simple use cases like basic query parsing, the full AST model introduces unnecessary complexity and memory usage, as configurable options only partially mitigate this.

Frequently Asked Questions

Quick Stats

Stars219
Forks41
Contributors0
Open Issues6
Last commit3 months ago
CreatedSince 2016

Tags

#parse#sdl#graphql#dotnet#lexer#ast#abstract-syntax-tree#query-parsing#parser

Built With

.
.NET

Included in

Core21.2k
Auto-fetched 7 hours ago

Related Projects

OpenApi GeneratorOpenApi Generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)

Stars26,618
Forks7,619
Last commit9 hours ago
RestSharpRestSharp

Simple REST and HTTP API Client for .NET

Stars9,832
Forks2,308
Last commit1 month ago
NSwagNSwag

The Swagger/OpenAPI toolchain for .NET, ASP.NET Core and TypeScript.

Stars7,350
Forks1,353
Last commit1 month ago
GraphQL.NETGraphQL.NET

GraphQL for .NET

Stars5,993
Forks945
Last commit21 hours ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub