How to build a jwt refresh token flow with graphql-request? #8396
-
Hi, my current setup: const config: CodegenConfig = { export default config` |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @chrisLovesCode, A middleware function has the following signature: type SdkFunctionWrapper = <T>(action: (requestHeaders?:Record<string, string>) => Promise<T>, operationName: string, operationType?: string) => Promise<T>; meaning that you can pass new headers to the current request, and, I guess, get the returned headers from the result of the request (return of |
Beta Was this translation helpful? Give feedback.
Hi @chrisLovesCode,
A middleware function has the following signature:
meaning that you can pass new headers to the current request, and, I guess, get the returned headers from the result of the request (return of
action()
).I am not an expert with this plugin, but you might need to use
rawRequest()
instead of simplerequest()
in order to get the response headers.