graphql-request
graphql-request copied to clipboard
`requestMiddleware` does not have a supported type that can be exported (`RequestExtendedInit`)
When defining middleware, I cannot get access to the correct type RequestExtendedInit. I think RequestExtendedInit should be able to be exported.
export declare type RequestMiddleware<V extends Variables = Variables> = (request: RequestExtendedInit<V>) => RequestExtendedInit | Promise<RequestExtendedInit>;

Have you found a temporary workaround for this perhaps?
Edit: For now creating the middleware function as an arrow function does the job.

I encountered the same problem: RequestExtendedInit type is not exported. For now I use any as a type for my middleware's request.

Same issue for me with version 5.1.0. Reverted to 5.0.