Skip to content

Commit

Permalink
Merge branch 'bug-fix-graphql-403' of github.com:markgrahamdawson/cyl…
Browse files Browse the repository at this point in the history
…c-ui into bug-fix-graphql-403
  • Loading branch information
Mark Dawson committed Oct 2, 2023
2 parents acd2608 + b1258c8 commit 375c649
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/services/workflow.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,18 @@ class WorkflowService {
async loadTypes () {
// TODO: this assumes all workflows use the same schema which is and
// isn't necessarily true, not quite sure, come back to this later.
const response = await this.apolloClient.query({
query: getIntrospectionQuery(),
fetchPolicy: 'no-cache'
})
let response = null
try {
response = await this.apolloClient.query({
query: getIntrospectionQuery(),
fetchPolicy: 'no-cache'
})
} catch (err) {
console.error(err)
console.log('retrying')
await new Promise(resolve => setTimeout(resolve, 2000))
return this.loadTypes()

Check warning on line 169 in src/services/workflow.service.js

View check run for this annotation

Codecov / codecov/patch

src/services/workflow.service.js#L166-L169

Added lines #L166 - L169 were not covered by tests
}
const mutations = response.data.__schema.mutationType.fields
const queries = response.data.__schema.queryType.fields
const { types } = response.data.__schema
Expand Down

0 comments on commit 375c649

Please sign in to comment.