Skip to content

Commit

Permalink
Fix schema refetching
Browse files Browse the repository at this point in the history
  • Loading branch information
timsuchanek committed Apr 2, 2018
1 parent 97549f1 commit d2ad342
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ export class Backoff {
await this.cb()
this.count++
if (this.running && this.count < this.maxRetries) {
setTimeout(fn, fibonacci(this.count) * 1000)
setTimeout(
fn,
(this.count < 15 ? 3 : fibonacci(this.count - 12)) * 1000,
)
}
}
fn()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ function* runQuerySaga(action) {
if (value && value.extensions) {
const extensions = value.extensions
yield put(setResponseExtensions(extensions))
delete value.extensiosn
delete value.extensions
}
const response = new ResponseRecord({
date: JSON.stringify(value ? value : formatError(error), null, 2),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,12 @@ const reducer = handleActions(
.set('sessionCount', newState.sessions.size)
},
NEW_SESSION: (state, { payload: { reuseHeaders, endpoint } }) => {
let session = makeSession(
endpoint || state.sessions.first().endpoint,
).set('query', '')
const currentSession = state.sessions.first()
let session = makeSession(endpoint || currentSession.endpoint).merge({
query: '',
isReloadingSchema: currentSession.isReloadingSchema,
endpointUnreachable: currentSession.endpointUnreachable,
})
if (reuseHeaders) {
const selectedSessionId = getSelectedSessionId(state)
const currentSession = state.sessions.get(selectedSessionId)
Expand Down

0 comments on commit d2ad342

Please sign in to comment.