Can you eat mayonnaise when you are breast feeding?

Yes
It's safe to eat whilst you're breast feeding, though it can affect you it is unlikely to affect your baby.
Mayonnaise, often abbreviated as mayo, is a thick, creamy sauce often used as a condiment. It originates from Mahon (Spain); in Spanish Mahonesa or Mayonesa, in Catalan Maionesa. It is a stable emulsion of oil, egg yolk and either vinegar or lemon juice, with many options for embellishment with other herbs and spices. Lecithin in the egg yolk is the emulsifier. Mayonnaise varies in color but is often white, cream, or pale yellow. It may range in texture from that of light cream to thick. In countries influenced by French culture, mustard is also a common ingredient. In Spain and Italy, olive oil is used as the oil and mustard is never included. Numerous other sauces can be created from it with addition of various herbs, spices, and finely chopped pickles. Where mustard is used, it is also an emulsifier.
In cooking, a sauce is liquid, creaming or semi-solid food served on or used in preparing other foods. Sauces are not normally consumed by themselves; they add flavor, moisture, and visual appeal to another dish. Sauce is a French word taken from the Latin salsa, meaning salted. Possibly the oldest sauce recorded is garum, the fish sauce used by the Ancient Romans.
Sauces need a liquid component, but some sauces (for example, pico de gallo salsa or chutney) may contain more solid elements than liquid. Sauces are an essential element in cuisines all over the world.
Sauces may be used for savory dishes or for desserts. They can be prepared and served cold, like mayonnaise, prepared cold but served lukewarm like pesto, or can be cooked like bechamel and served warm or again cooked and served cold like apple sauce. Some sauces are industrial inventions like Worcestershire sauce, HP sauce, or nowadays mostly bought ready-made like soy sauce or ketchup, others still are freshly prepared by the cook. Sauces for salads are called salad dressing. Sauces made by deglazing a pan are called pan sauces.