Skip to content

Commit 72476b9

Browse files
authored
fix(explorer): Show message if introspection is disbaled (#1349)
1 parent 6798e26 commit 72476b9

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/Controller/ExplorerController.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,13 @@ public function viewExplorer(ServerInterface $graphql_server, Request $request)
8686
$url = $this->urlGenerator->generate("graphql.query.{$graphql_server->id()}");
8787
$introspectionData = $this->introspection->introspect($graphql_server);
8888

89+
if ($graphql_server->get('disable_introspection')) {
90+
return [
91+
'#type' => 'markup',
92+
'#markup' => $this->t('Introspection is disabled for this server, enable it to use the Explorer.'),
93+
];
94+
}
95+
8996
return [
9097
'#type' => 'markup',
9198
'#markup' => '<div id="graphql-explorer"></div>',

0 commit comments

Comments
 (0)