Skip to content

Commit

Permalink
Update src/Controller.php
Browse files Browse the repository at this point in the history
Co-authored-by: Steve Boyd <emteknetnz@gmail.com>
  • Loading branch information
maxime-rainville and emteknetnz authored Feb 2, 2024
1 parent b269844 commit c579ff0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ public function index(HTTPRequest $request)
$jsonPayload = json_encode($data);

Requirements::customScript(<<<JS
window.addEventListener('load', function (event) {
GraphQLPlayground.init(document.getElementById('root'), $jsonPayload)
})
JS
window.addEventListener('load', function (event) {
GraphQLPlayground.init(document.getElementById('root'), $jsonPayload)
});
JS
);

return [
Expand Down

0 comments on commit c579ff0

Please sign in to comment.