API Query doesn't wait for asynchronous input to be resolved


Short description: asynchronuous query doesn't wait dependent async transformers to be resolved, sending incomplete HTTP request.


When I have API Query getProductsQuery, that has Authorization header with the following value Bearer {{ getAccessTokenAsyncronouslyTransofrmer.value }}, and getAccessTokenAsyncronouslyTransofrmer is a Transformer with the following body:

return {{ urlparams.accessToken || generateAccessToken.data.accessToken }}; 

then the getProductsQuery is executed on page load but with empty Bearer header value. It doesn't wait when getAccessTokenAsyncronouslyTransofrmer resolves.

Then, after generateAccessToken is asyncronously finished, getProductsQuery is re-exececuted again because input parameters have changed.

So if we look into the query log, it will be the following:

  1. getProductsQuery - failed because header has empty Bearer token
  2. generateAccessToken - success
  3. getProductsQuery - success. It's triggered because input has changed, and now Bearer XXX has the correct value from transformer.

Quetions: why in the point 1 getProductsQuery doesn't wait resolving value from transformer?

Had a conversation with Support Team. This is not supported, transformer doesn't wait for async operations