update for the return type tweak
Signed-off-by: Karl Haworth <karl.haworth@aa.com>
This commit is contained in:
+7
-9
@@ -84,7 +84,9 @@ export const handleAuthRequest = ({
|
||||
...options,
|
||||
headers: {
|
||||
...options.headers,
|
||||
Authorization: `Bearer ${await authCallback()}`,
|
||||
...(authCallback && {
|
||||
Authorization: `Bearer ${await authCallback()}`,
|
||||
}),
|
||||
},
|
||||
...cookies,
|
||||
});
|
||||
@@ -112,14 +114,10 @@ export const ApolloExplorerBrowser = ({ endpoints, authCallback }: Props) => {
|
||||
<ApolloExplorer
|
||||
className={classes.explorer}
|
||||
graphRef={endpoints[tabIndex].graphRef}
|
||||
handleRequest={
|
||||
authCallback
|
||||
? handleAuthRequest({
|
||||
legacyIncludeCookies: false,
|
||||
authCallback: authCallback,
|
||||
})
|
||||
: undefined
|
||||
}
|
||||
handleRequest={handleAuthRequest({
|
||||
legacyIncludeCookies: false,
|
||||
authCallback: authCallback,
|
||||
})}
|
||||
persistExplorerState={endpoints[tabIndex].persistExplorerState}
|
||||
initialState={endpoints[tabIndex].initialState}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user