How to get workflow type from ID?

It does not seem like GetWorkflow returns that information at the moment.

The underlying use-case here is limiting a QueryWorkflow to a specific workflow type (so I suppose this is also an alternative to the original question). Otherwise, it is possible for the query to be handled by any workflow that “handles” the same query type, and if the result is a struct, it can happily map the values without complaining.

At the moment, as sort of a workaround, I am currently setting the workflow type from workflow.GetInfo in the query response payload, and using that to check.

Another option is to pass workflow type as a query argument and let workflow query handler fail if the type doesn’t match.