class GraphqlDevise::MountMethod::OptionValidators::ProvidedOperationsValidator
Public Class Methods
new(options:, supported_operations:)
click to toggle source
# File lib/graphql_devise/mount_method/option_validators/provided_operations_validator.rb, line 9 def initialize(options:, supported_operations:) @options = options @supported_operations = supported_operations end
Public Instance Methods
validate!()
click to toggle source
# File lib/graphql_devise/mount_method/option_validators/provided_operations_validator.rb, line 14 def validate! supported_keys = @supported_operations.keys [ SupportedOperationsValidator.new(provided_operations: @options.skip, key: :skip, supported_operations: supported_keys), SupportedOperationsValidator.new(provided_operations: @options.only, key: :only, supported_operations: supported_keys), SupportedOperationsValidator.new(provided_operations: @options.operations.keys, key: :operations, supported_operations: supported_keys) ].each(&:validate!) end