C# Class GraphQL.Validation.Complexity.ComplexityAnalyzer

Inheritance: IComplexityAnalyzer
Exibir arquivo Open project: graphql-dotnet/graphql-dotnet

Private Properties

Property Type Description
Analyze ComplexityResult
GetImpactFromArgs double?
RecordFieldComplexity void

Public Methods

Method Description
ComplexityAnalyzer ( int maxRecursionCount = 250 ) : System

Creates a new instance of ComplexityAnalyzer

Validate ( Document document, ComplexityConfiguration complexityParameters ) : void

Private Methods

Method Description
Analyze ( Document doc, double avgImpact = 2.0d ) : ComplexityResult

Analyzes the complexity of a document.

GetImpactFromArgs ( INode node ) : double?
RecordFieldComplexity ( INode node, ComplexityResult result, double impact ) : void

Method Details

ComplexityAnalyzer() public method

Creates a new instance of ComplexityAnalyzer
public ComplexityAnalyzer ( int maxRecursionCount = 250 ) : System
maxRecursionCount int /// Max. number of times to traverse tree nodes. GraphiQL queries take ~95 iterations, adjust as needed. ///
return System

Validate() public method

public Validate ( Document document, ComplexityConfiguration complexityParameters ) : void
document GraphQL.Language.AST.Document
complexityParameters ComplexityConfiguration
return void