Granny smith apples are my favorite apple for cooking. They are very firm which ensures that they don't get mushy when cooked. Other good options are Jonathan apples or Honeycrisp.