Use `eager_query` to compute `workflow_state` efficiently