It can be eaten if thoroughly washed and is better if cooked, but then the skin is leathery and requires a few extra steps to make it worth eating. This guide for eating dragon fruit skin elaborates more on preparing it for recipes.