Skip to content

Commit d903944

Browse files
committed
Pass required variables via wireRenderFile function.
1 parent 16e2c14 commit d903944

File tree

3 files changed

+41
-38
lines changed

3 files changed

+41
-38
lines changed

GraphiQL/full.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
var config = <?= json_encode($config->js()) ?>;
2525
</script>
2626
<?php
27-
$fullGraphiQL = true;
2827
require_once(realpath(__DIR__ . "/partial.php"));
2928
?>
3029
</body>

GraphiQL/partial.php

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
<?php if(!$fullGraphiQL): ?>
2-
<style>
3-
.AdminThemeDefault #graphiql {
4-
margin-top: 30px;
5-
}
6-
#graphiql {
7-
height: 86vh;
8-
border: 5px solid #efefef;
9-
}
10-
#graphiql * {
11-
box-sizing: content-box;
12-
-webkit-box-sizing: content-box;
13-
-moz-box-sizing: content-box;
14-
line-height: 1rem;
15-
}
16-
#graphiql .doc-explorer-title{
17-
overflow: hidden;
18-
}
19-
#graphiql .graphiql-container .doc-explorer-back{
20-
line-height: 0.85rem;
21-
}
22-
#graphiql .doc-explorer-contents{
23-
padding: 5px 20px 15px;
24-
}
25-
#graphiql .graphiql-container .search-box{
26-
margin: 5px 0px 8px 0;
27-
}
28-
#graphiql .graphiql-container .search-box:before{
29-
top: 5px;
30-
}
31-
#graphiql .graphiql-container .search-box input{
32-
padding: 6px 0px 8px 24px;
33-
width: 94%;
34-
background: none;
35-
}
36-
</style>
2+
<style>
3+
.AdminThemeDefault #graphiql {
4+
margin-top: 30px;
5+
}
6+
#graphiql {
7+
height: 86vh;
8+
border: 5px solid #efefef;
9+
}
10+
#graphiql * {
11+
box-sizing: content-box;
12+
-webkit-box-sizing: content-box;
13+
-moz-box-sizing: content-box;
14+
line-height: 1rem;
15+
}
16+
#graphiql .doc-explorer-title{
17+
overflow: hidden;
18+
}
19+
#graphiql .graphiql-container .doc-explorer-back{
20+
line-height: 0.85rem;
21+
}
22+
#graphiql .doc-explorer-contents{
23+
padding: 5px 20px 15px;
24+
}
25+
#graphiql .graphiql-container .search-box{
26+
margin: 5px 0px 8px 0;
27+
}
28+
#graphiql .graphiql-container .search-box:before{
29+
top: 5px;
30+
}
31+
#graphiql .graphiql-container .search-box input{
32+
padding: 6px 0px 8px 24px;
33+
width: 94%;
34+
background: none;
35+
}
36+
</style>
3737
<?php endif; ?>
3838
<div id="graphiql">Loading...</div>
3939
<script>

ProcessGraphQL.module

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ class ProcessGraphQL extends Process implements Module {
9090
{
9191
$this->setupGraphiQLAssets();
9292
$fullFilename = $this->config->paths->site . 'modules/ProcessGraphQL/GraphiQL/full.php';
93-
return wireRenderFile($fullFilename);
93+
return wireRenderFile($fullFilename, [
94+
'fullGraphiQL' => true,
95+
]);
9496
}
9597

9698
/**
@@ -101,7 +103,9 @@ class ProcessGraphQL extends Process implements Module {
101103
{
102104
$this->setupGraphiQLAssets();
103105
$partialFilename = $this->config->paths->site . 'modules/ProcessGraphQL/GraphiQL/partial.php';
104-
return wireRenderFile($partialFilename);
106+
return wireRenderFile($partialFilename, [
107+
'fullGraphiQL' => false,
108+
]);
105109
}
106110

107111
/**

0 commit comments

Comments
 (0)