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: confirmation_email_resend.rb
    path of file: ./repos/mashcard/apps/server-monolith/app/graphql/mutations/users
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Mutations
  module Users
    class ConfirmationEmailResend < ::Mutations::BaseMutation
      graphql_name 'UserConfirmationEmailResend'
      argument :email, Scalars::Email, "User's email address", required: true

   
    
      def resolve(email:)
        Mashcard::Redis.with(:state) do |redis|
          key = "graphql:mutation:userConfirmationEmailResend/#{email.to_data_masking}"
          return { errors: [I18n.t('errors.messages.send_interval')] } if redis.exists?(key)

          user_authentication = ::Users::Authentication.find_by(email: email, confirmed_at: nil)
          if user_authentication.nil?
            { errors: ["Email #{I18n.t('errors.messages.not_found')}"] }
          elsif user_authentication.resend_confirmation_instructions
            redis.setex(key, SEND_INTERVAL, '1')
            {}
          end
        end