[][src]Crate graphql_depth_limit

Utilites for graphql query depth analysis

graphql_depth_limit provide utilities for easy identification of possible malicious queries (high depth).

Quick Start

example

use graphql_depth_limit::QueryDepthAnalyzer;

let query = r#"
    query {
        hello {
            world
        }
    }
"#;
let analyzer : QueryDepthAnalyzer = QueryDepthAnalyzer::new(query, vec![], None).unwrap();
let verify_result = analyzer.verify(5);

Structs

Directive
Document

Root of query data

ExceedMaxDepth
Field
FragmentDefinition
FragmentSpread
InlineFragment
Mutation
Number

This represents integer number

ParseError

Error parsing query

Query
QueryDepthAnalyzer
SelectionSet
Subscription
VariableDefinition

Enums

Definition
OperationDefinition
Selection
Type
TypeCondition
Value

Functions

parse_query

Parses a piece of query language and returns an AST

Type Definitions

Name

An alias for string, used where graphql expects a name