MoreWheels.php in GraphQL 8.3
File
tests/modules/graphql_override_test/src/Plugin/GraphQL/Fields/MoreWheels.php
View source
<?php
namespace Drupal\graphql_override_test\Plugin\GraphQL\Fields;
use Drupal\graphql\GraphQL\Execution\ResolveContext;
use Drupal\graphql_plugin_test\Plugin\GraphQL\Fields\Wheels;
use GraphQL\Type\Definition\ResolveInfo;
class MoreWheels extends Wheels {
public function resolveValues($value, array $args, ResolveContext $context, ResolveInfo $info) {
foreach (parent::resolveValues($value, $args, $context, $info) as $wheels) {
(yield $wheels + 1);
}
}
}
Classes
Name |
Description |
MoreWheels |
Replace existing "wheels" field with ... one more wheel. |