GraphiQL in Backend

This commit is contained in:
Gogs
2021-06-02 15:46:20 +02:00
parent e7d7d18f77
commit a65593b4f9
24 changed files with 61895 additions and 617 deletions
+32 -34
View File
@@ -8,48 +8,46 @@ use October\Rain\Extension\Extendable;
*/
class GraphCode extends CodeBase
{
public $graph;
public $graph;
/**
* Creates the object instance.
* @param \GermanAirlinesVa\Graphql\Classes\Graph $graph Specifies the Headstart graph.
* @param null
* @param \GermanAirlinesVa\Graphql\Classes\GraphController $controller Specifies the Graph controller.
*/
public function __construct($graph, $layout, $controller)
{
$this->graph = $graph;
$this->controller = $controller;
/**
* Creates the object instance.
* @param \GermanAirlinesVa\Graphql\Classes\Graph $graph Specifies the Headstart graph.
* @param null
* @param \GermanAirlinesVa\Graphql\Classes\GraphController $controller Specifies the Graph controller.
*/
public function __construct($graph, $layout, $controller)
{
$this->graph = $graph;
$this->controller = $controller;
Extendable::__construct();
}
Extendable::__construct();
public function __get($name)
{
if (isset($this->graph->components[$name]) || isset($this->layout->components[$name])) {
return $this[$name];
}
public function __get($name)
{
if (isset($this->graph->components[$name]) || isset($this->layout->components[$name])) {
return $this[$name];
}
if (($value = $this->graph->{$name}) !== null) {
return $value;
}
if (array_key_exists($name, $this->controller->vars)) {
return $this[$name];
}
return null;
if (($value = $this->graph->{$name}) !== null) {
return $value;
}
public function __set($name, $value)
{
return $this->graph->{$name} = $value;
if (array_key_exists($name, $this->controller->vars)) {
return $this[$name];
}
public function __isset($name)
{
return isset($this->graph->{$name});
}
return null;
}
public function __set($name, $value)
{
return $this->graph->{$name} = $value;
}
public function __isset($name)
{
return isset($this->graph->{$name});
}
}