Sha256: 1f38d1fdae9d8ca723a60bc25a08c19ef29661ae5a9b4db434a049a8c27bab5a

Contents?: true

Size: 426 Bytes

Versions: 21

Compression:

Stored size: 426 Bytes

Contents

# frozen_string_literal: true
module GraphQL
  module Analysis
    module AST
      class MaxQueryDepth < QueryDepth
        def result
          return unless query.max_depth

          if @max_depth > query.max_depth
            GraphQL::AnalysisError.new("Query has depth of #{@max_depth}, which exceeds max depth of #{query.max_depth}")
          else
            nil
          end
        end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
graphql-1.9.15 lib/graphql/analysis/ast/max_query_depth.rb
graphql-1.9.14 lib/graphql/analysis/ast/max_query_depth.rb
graphql-1.10.0.pre1 lib/graphql/analysis/ast/max_query_depth.rb
graphql-1.9.13 lib/graphql/analysis/ast/max_query_depth.rb
graphql-1.9.12 lib/graphql/analysis/ast/max_query_depth.rb
graphql-1.9.11 lib/graphql/analysis/ast/max_query_depth.rb
graphql-1.9.10 lib/graphql/analysis/ast/max_query_depth.rb
graphql-1.9.9 lib/graphql/analysis/ast/max_query_depth.rb
graphql-1.9.8 lib/graphql/analysis/ast/max_query_depth.rb
graphql-1.9.7 lib/graphql/analysis/ast/max_query_depth.rb
graphql-1.9.6 lib/graphql/analysis/ast/max_query_depth.rb
graphql-1.9.5 lib/graphql/analysis/ast/max_query_depth.rb
graphql-1.9.4 lib/graphql/analysis/ast/max_query_depth.rb
graphql-1.9.3 lib/graphql/analysis/ast/max_query_depth.rb
graphql-1.9.2 lib/graphql/analysis/ast/max_query_depth.rb
graphql-1.9.1 lib/graphql/analysis/ast/max_query_depth.rb
graphql-1.9.0 lib/graphql/analysis/ast/max_query_depth.rb
graphql-1.9.0.pre4 lib/graphql/analysis/ast/max_query_depth.rb
graphql-1.9.0.pre3 lib/graphql/analysis/ast/max_query_depth.rb
graphql-1.9.0.pre2 lib/graphql/analysis/ast/max_query_depth.rb