{"repo":"graphql-dotnet/parser","free":true,"listed":false,"github":"https://github.com/graphql-dotnet/parser","clone":"git clone https://github.com/graphql-dotnet/parser.git","description":"A lexer and parser for GraphQL in .NET","language":"C#","stars":219,"topics":["lexer","graphql","parse","ast"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"GraphQL.NET Parser This library contains a lexer and parser as well as the complete GraphQL AST model that allows you to work with GraphQL documents compatible with the October 2021 spec. The parser from this library is used by the GraphQL.NET project and was verified by many test data sets. Preview versions of this package are available on GitHub Packages. 1. Lexer Generates token based on input text. Lexer takes advantage of ReadOnlyMemory and in most cases does not allocate memory on the managed heap at all. Usage: Lex method always returns the first token it finds. In this case the result would look like following. 2. Parser Parses provided GraphQL expression into AST (abstract syntax tree). Parser also takes advantage of ReadOnlyMemory but still allocates memory for AST. Usage: By default ParserOptions.Ignore is IgnoreOptions.None . If you want to ignore all comments use IgnoreOptions.Comments . If you don't need information about tokens locations in the source document, then use flag IgnoreOptions.Locations . Or just use IgnoreOptions.All and this will maximize the saving of memory allocated in the managed heap for AST. You can parse not only entire GraphQLDocument but also concrete AST nodes. Use generic overload. 3. ASTVisitor ASTVisitor provides API to traverse AST of the parsed GraphQL document. Default implementation traverses all AST nodes of the provided one. You can inherit from it and override desired methods to implement your own AST processing algorithm. SDLP","default_branch":null,"files":null,"tree":[],"storefront":"/r/graphql-dotnet","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/graphql-dotnet/parser/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}