update for the return type tweak

Signed-off-by: Karl Haworth <karl.haworth@aa.com>
This commit is contained in:
Karl Haworth
2024-04-05 10:38:42 -04:00
parent 6ecacd3ffe
commit a1e39ffd2a
@@ -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}
/>