You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: variable_validation_error.rb
    path of file: ./repos/graphql-ruby/lib/graphql/query
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
module GraphQL
  class Query
    class Variable
    
      def initialize(variable_ast, type, value, validation_result, msg: nil)
        @value = value
        @validation_result = validation_result

        msg ||= "Variable $#{variable_ast.name} of type #{type.to_type_signature} was provided invalid value"

        if problem_fields.any?
          msg += " for #{problem_fields.join(", ")}"
        end