Heat the oil in a large nonstick wok or frying pan over a medium heat. Add the curry leaves, mustard seeds and onion. Stir-fry for 3–4 minutes until fragrant and the onion is starting to soften, then add the cumin, coriander, curry powder and turmeric. Stir-fry for a further 1–2 minutes until fragrant.
Add the garlic and okra, and increase the heat to high. Cook, stirring, for 2–3 minutes, then add the peas and tomatoes. Season to taste, cover and reduce the heat to low. Cook gently for 10–12 minutes, stirring occasionally, until the okra is just tender. Remove from the heat and sprinkle over the grated coconut just before serving.