First of all, you must use the right kind of apples! If you use a softer variety, it will turn into applesauce in the oven. You want to make sure you are using a good baking apple that can hold up to the heat of the oven. For a list of great baking apples, check out my post about the best apples for an apple crisp! Additionally, you need to have a thickener in your filling. Typically, this is flour or cornstarch. For a fantastic recipe that won't get mushy, try out my easy apple pie filling!