Add the remaining 1 teaspoon oil and onion to the pan and cook, stirring, over medium heat, for 2 minutes. Stir in garlic and water. Cover and cook until the onion is soft, 4 to 6 minutes. Add chard (or spinach) and cook, stirring, until starting to wilt, 1 to 2 minutes. Stir in tomatoes, beans and pepper and bring to a simmer. Stir in the gnocchi and sprinkle with mozzarella and Parmesan. Cover and cook until the cheese is melted and the sauce is bubbling, about 3 minutes.