Class: GraphQL::Analysis::MaxQueryDepth
- Inherits:
 - 
      QueryDepth
      
        
- Object
 - Analyzer
 - QueryDepth
 - GraphQL::Analysis::MaxQueryDepth
 
 
- Defined in:
 - lib/graphql/analysis/max_query_depth.rb
 
Instance Method Summary collapse
Methods inherited from QueryDepth
#initialize, #on_enter_field, #on_leave_field
Methods inherited from Analyzer
#analyze?, #initialize, #visit?
Constructor Details
This class inherits a constructor from GraphQL::Analysis::QueryDepth
Instance Method Details
#result ⇒ Object
      5 6 7 8 9 10 11 12 13 14 15 16 17  | 
    
      # File 'lib/graphql/analysis/max_query_depth.rb', line 5 def result configured_max_depth = if query query.max_depth else multiplex.schema.max_depth end if configured_max_depth && @max_depth > configured_max_depth GraphQL::AnalysisError.new("Query has depth of #{@max_depth}, which exceeds max depth of #{configured_max_depth}") else nil end end  |