lib/graphql/static_validation/validation_context.rb in graphql-1.11.10 vs lib/graphql/static_validation/validation_context.rb in graphql-1.12.0

- old
+ new

@@ -17,15 +17,14 @@ attr_reader :query, :errors, :visitor, :on_dependency_resolve_handlers def_delegators :@query, :schema, :document, :fragments, :operations, :warden - def initialize(query, visitor_class, max_errors) + def initialize(query, visitor_class) @query = query @literal_validator = LiteralValidator.new(context: query.context) @errors = [] - @max_errors = max_errors || Float::INFINITY @on_dependency_resolve_handlers = [] @visitor = visitor_class.new(document, self) end def_delegators :@visitor, @@ -36,13 +35,9 @@ @on_dependency_resolve_handlers << handler end def validate_literal(ast_value, type) @literal_validator.validate(ast_value, type) - end - - def too_many_errors? - @errors.length >= @max_errors end end end end