Used to get the request context in the BFF function.
according to the framework extend plugin, export from the corresponding namespace:
function useContext(): any
Developers can get more request information through context
, such as browser UA(an example is when using the koa framework):
only in BFF function, useContext
API can be used.
Although the useContext
API is supported in any framework extend plugin, the types of return values are different.