Skip to content

Commit

Permalink
temporary comments
Browse files Browse the repository at this point in the history
  • Loading branch information
brunobg committed Sep 15, 2021
1 parent 61c7453 commit da87295
Showing 1 changed file with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,22 @@ public function field(CodeGenerator $generator, Field $field)
* @var GraphQLCodeGenerator $generator
*/

$name = $field->getName();

/**
* @var Datatype_relationship
*/
$datatype = $field->getDatatype();
$name = $field->getName();

$params = [];

$recurseLevel = $params[self::RECURSE] ?? 1;
if (!$recurseLevel) {
return '';
}
if (!($params[self::RECURSE_INVERSE] ?? true) && $this->isInverse) {
return '';
}
// $recurseLevel = $params[self::RECURSE] ?? 1;
// if (!$recurseLevel) {
// return '';
// }
// if (!($params[self::RECURSE_INVERSE] ?? true) && $this->isInverse) {
// return '';
// }

$model = $datatype->getTargetClass();
if ($datatype->getIsInverse()) {
Expand Down Expand Up @@ -80,7 +81,7 @@ public function field(CodeGenerator $generator, Field $field)
$graphqlQuery = array_merge(
$graphqlQuery,
$formulariumModel->mapFields(
function (Field $f) use ($recurseLevel) {
function (Field $f) { // use ($recurseLevel) {
$type = $f->getDatatype();
if ($type instanceof Datatype_relationship && !$type->getIsInverse()) {
return '';
Expand All @@ -97,7 +98,7 @@ function (Field $f) use ($recurseLevel) {
*/
$formulariumModel = call_user_func("$model::getFormularium"); /** @phpstan-ignore-line */
$graphqlQuery = $formulariumModel->mapFields(
function (Field $f) use ($recurseLevel) {
function (Field $f) { // use ($recurseLevel) {
return \Modelarium\Frontend\Util::fieldShow($f) ? /* $f->toGraphqlQuery([self::RECURSE => $recurseLevel-1]) */ 'zzz' : null;
}
);
Expand Down

0 comments on commit da87295

Please sign in to comment.