Skip to content

Commit eed88d8

Browse files
authored
Merge pull request #106 from alafon/sf-toolbar
Update the whole Sf toolbar when using GraphiQL
2 parents cd2d9b4 + 7a1a721 commit eed88d8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Resources/views/GraphiQL/index.html.twig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@
4343
body: JSON.stringify(params),
4444
credentials: 'include',
4545
}).then((res) => {
46+
var xdebugToken = res.headers.get('X-Debug-Token')
47+
if (typeof Sfjs !== "undefined") {
48+
var toolbarElement = document.querySelector('.sf-toolbar')
49+
Sfjs.load(toolbarElement.id, '/_wdt/' + xdebugToken)
50+
}
4651
return res.text()
4752
}).then((body) => {
4853
try {

0 commit comments

Comments
 (0)