Pluggable strategy for obtaining and refreshing the Admin API access token
that the GraphiQL proxy injects into every request.
getToken may return a cached token; the proxy calls it for every request.
refreshToken (optional) is invoked when the upstream Admin API returns 401.
When omitted, the proxy falls back to calling getToken again on 401.
Implementations must throw TokenRefreshError (or any thrown error) when the
token cannot be obtained; the proxy renders the unauthorized template in that case.
Pluggable strategy for obtaining and refreshing the Admin API access token that the GraphiQL proxy injects into every request.
getTokenmay return a cached token; the proxy calls it for every request.refreshToken(optional) is invoked when the upstream Admin API returns 401. When omitted, the proxy falls back to callinggetTokenagain on 401.Implementations must throw
TokenRefreshError(or any thrown error) when the token cannot be obtained; the proxy renders the unauthorized template in that case.