Ministers and government officials resign all the time when they believe that their government's position is in error.
N.b.: I did not vote for Trump; I am not certain that everything in his immigration-related executive order is consistent with the law (but I am not certain that it's not, either: I am not a lawyer).