Network calls in workflow query handler

Is it okay to reach out to external APIs and perform network calls from within a workflow Query Handler?

Follow-up question: does the query handler run within the workflow or activity worker process?

1 Like

It is OK as the query handler is not allowed to mutate the workflow state. But the current implementation of the SDK doesn’t make it easy to pass external dependencies to the query handler.

One possibility to fix this is to allow running local activities from the query handler.

1 Like