It is guaranteed that the signal method is called before the query. As a signal method can block for an unlimited amount of time (up to the workflow run timeout) it is not guaranteed that a query will be called only after the signal method returns.
If a signal method doesn’t block then it is guaranteed that the query is called after the signal method returns.