Using a mandoline or grater, grate the squash and onion until it is all finely shredded. The thickness should resemble shredded cheese.
Place the vegetables in a collander to drain for about 30 minutes, then squeeze out the remaining moisture with a clean kitchen towel. Set aside. Removing this moisture will prevent the oil from popping when you fry the patties.
In a small bowl, lightly whisk the egg.
In a large mixing bowl, add in the flour, cornmeal, salt and pepper. Stir to combine. Add the egg, cheese, squash, and onion. Stir to combine.
Heat the oil in a deep pan over medium-high heat to 350 to 375F (180 to 190C).
Taking about 2 tbsp of the mixture, form it into a patty shape and carefully place it into the skillet. Cook until golden brown, about 3 minutes on each side.