Toast walnuts in a dry skillet over medium-low heat until fragrant. Combine toasted walnuts, Parmesan, olive oil, garlic, lemon juice, salt, and pepper in a food processor. Pulse until a textured paste forms. Set aside.
Bring a pot of water to a boil. Add the gnocchi and cook until they float to the surface. Drain and set aside.
While gnocchi cooks, heat butter in a large skillet over medium-high heat. Add sliced mushrooms and sauté until browned and tender, about 5-7 minutes. Remove from heat.
Add the drained gnocchi to the skillet with the mushrooms. Stir in about half of the prepared walnut pesto mixture. Cook over medium-high heat, stirring, until the gnocchi and mushrooms are golden brown and slightly crispy. Add arugula (if using) and toss gently.
If a saucier consistency is desired, whisk the remaining prepared pesto with a tablespoon or two of water in a small bowl until smooth. Drizzle this sauce over the gnocchi and mushrooms before serving. Ensure everything is well combined and heated through.