What is middleware in the Microsoft Graph Client?
devMiddleware components sit in the middle of the request and response cycle. Each middleware has access to a Context object, which contains the request, response, and any middleware-specific options (middlewareOptions).
To allow the request to continue through the pipeline, a middleware must explicitly call the execute method of the next middleware in the chain using the same Context object. The final middleware in the chain (typically an HTTP message handler) is responsible for performing the actual network request and setting the response object back into the Context.