giovannibenussi
9/14/2017 - 8:14 PM

validate-graphql-ruby-3.rb

module Validators
    class GraphqlValidator
        def self.validate_presence(attribute, value)
            return if value.present?
            raise GraphQL::ExecutionError, “You must provide a value for #{attribute}”
        end
    end
end