Preheat the oven to 400°F (200°C).
Line a baking sheet with parchment paper.
Roll out the puff pastry sheet lightly on a floured surface.
Cut the puff pastry into equal rectangles or squares.
Add diced ham and shredded cheese to one side of each pastry piece.
Spread a small amount of Dijon mustard over the filling if desired.
Fold the pastry over the filling and press edges with a fork to seal.
Brush the tops with beaten egg wash.
Transfer the pockets to the prepared baking sheet.
Bake for 18–20 minutes until golden brown and puffed.
Remove from the oven and let cool slightly before serving.
Garnish with chopped parsley if desired.