So in the example below your queen wants to go to f7 which is checkmate but your king is now exposed. Is the move illegal or not?
If you want to mate your opponent in 1 but it exposes your king is it allowed?


So in the example below your queen wants to go to f7 which is checkmate but your king is now exposed. Is the move illegal or not?
No, you can never expose your king to check. Think of it as if each player had one move left after the checkmating move. In your position, black will capture your king first.