Module: GraphQL::Schema::Member::HasValidators::ClassConfigured::ClassValidators Private

Includes:
EmptyObjects
Defined in:
lib/graphql/schema/member/has_validators.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Constant Summary

Constants included from EmptyObjects

EmptyObjects::EMPTY_ARRAY, EmptyObjects::EMPTY_HASH

Instance Method Summary collapse

Instance Method Details

#validatorsObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/graphql/schema/member/has_validators.rb', line 33

def validators
  inherited_validators = superclass.validators
  if inherited_validators.any?
    if @own_validators.nil?
      inherited_validators
    else
      inherited_validators + @own_validators
    end
  elsif @own_validators.nil?
    EMPTY_ARRAY
  else
    @own_validators
  end
end