I plan to have eyelid surgery and was told to use neosporin would it be ok to use mupirocin 22 grams 2%?

Why use either? I assume you mean cosmetic eyelid surgery (blepharoplasty.) it is virtually impossible for these incisions to become infected because of the excellent blood supply. Many ointments are not approved for use around the eye. Many people develop allergies to neomycin (in neosporin.) Mupirocin is expensive and generally used when MRSA is a consideration. I would ask why you need either of these.
Either is ok. They are both topical antibacterial creams/ointments...If recommended by your doc to use on the wound after surgery, either one should be ok..
Eyelid surgery. Dear health27, this should not be a problem, just check with your doctor to let him know. Best, nima shemirani.
Eye antibiotic. As an ophthalmologist, i typically prescribe ophthalmic eye ointment after eyelid surgery. It is ok to to get these in the eye where as Mupirocin and neosporin are not formulated for the eye, so caution should be used around the eye.