lib/rails/graphql/directive.rb
# Checks if all the arguments provided to the directive instance are valid
Checks if all the arguments provided to the directive instance are valid
Checks if all the arguments provided to the directive instance are valid
def validate!(*)
        invalid = all_arguments.reject { |name, arg| arg.valid?(@args[name]) }
        return if invalid.empty?
        invalid = invalid.map { |name, _| <<~MSG }
          Invalid value "#{@args[name].inspect}" for #{name} argument.
        MSG
        raise ArgumentError, <<~MSG.squish
          Invalid usage of @#{gql_name} directive: #{invalid.to_sentence}.
        MSG
      end
def validate! ( * ) invalid = all_arguments . reject { | name , arg | arg . valid? ( @args [ name ] ) } return if invalid . empty? invalid = invalid . map { | name , _ | <<~MSG } 
          Invalid value " #{ @args [ name ] . inspect } " for  #{ name }  argument.
         MSG raise ArgumentError , <<~MSG . squish 
          Invalid usage of @ #{ gql_name }  directive:  #{ invalid . to_sentence } .
         MSG end
Checks if all the arguments provided to the directive instance are valid
Checks if all the arguments provided to the directive instance are valid