Skip to content

Commit

Permalink
chore: tweak GraphQL playground default settings
Browse files Browse the repository at this point in the history
  • Loading branch information
cayter committed Jul 15, 2020
1 parent 56a3579 commit 73e2adb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pack/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ func gqlPlaygroundTpl(path string, c *Context) []byte {
var v = document.cookie.match('(^|;) ?' + name + '=([^;]*)(;|$)');
return v ? v[2] : null;
}
window.addEventListener('load', function (event) {
GraphQLPlayground.init(document.getElementById('root'), {
endpoint: '` + path + `',
Expand All @@ -123,8 +124,11 @@ func gqlPlaygroundTpl(path string, c *Context) []byte {
'X-CSRF-Token': unescape(getCookie("` + mdwCSRFAuthenticityTemplateFieldName(c) + `"))
},
settings: {
'editor.reuseHeaders': false,
'request.credentials': 'include',
'schema.polling.interval': 5000
'schema.polling.interval': 30000,
'tracing.hideTracingResponse': true,
'tracing.tracingSupported': true
}
})
})
Expand Down

0 comments on commit 73e2adb

Please # to comment.