Skip to content
Snippets Groups Projects
Commit 8348c91e authored by Adam Parák's avatar Adam Parák 💬 Committed by Marek Veselý
Browse files

prettier:

parent 33a2437e
No related branches found
No related tags found
No related merge requests found
......@@ -14,14 +14,14 @@ const debounced = (fn: (msg: string) => void, delay: number) => {
const authLink = (onFailedAuth: (msg: string) => void) =>
import.meta.env.VITE_NOAUTH === 'true'
? new ApolloLink((operation, forward) => forward(operation))
: onError(({graphQLErrors}) => {
if (graphQLErrors) {
graphQLErrors.forEach(error => {
if (error.message === 'Authentication failed') {
debounced(onFailedAuth, 1000)('Authentication failed')
}
})
}
})
: onError(({ graphQLErrors }) => {
if (graphQLErrors) {
graphQLErrors.forEach(error => {
if (error.message === 'Authentication failed') {
debounced(onFailedAuth, 1000)('Authentication failed')
}
})
}
})
export default authLink
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment