We are trying to build a Forge app in which we need to alter the response object of an Api call and send response to client.
To achieve this can we use Redux as middleware?
Is there any other way to alter the response object in Forge app?
Thanks & Regards,
Preethi H R
The forge function handler context does not contain the response object. It is an abstract context that contains specific properties with relation to the Atlassian host product.
See also Express JS alternatives in Forge - #3 by remie
The underlying issue here is that the Forge docs do a very bad job at explaining the basic concepts and what is actually passed to a function. I have tried to highlight this before: What arguments do Forge functions receive?
You are right, and it seems to become more urgent as the number of questions on this forum from people wanting to develop Forge function as if they were Lambda or Google Cloud functions are increasing.
@danielwinterw @Nir I agree with @tbinna that the forge documentation is being very unclear of A) the different types of functions (not every module handler is the same) and their arguments.
It would be great if the documentation of every module that includes a reference to a resolver / function could include more details on the parameters that are available within the context of that module and the expected return object.