Automattic\WooCommerce\Vendor\GraphQL\Type\Definition
FieldDefinition::__construct
Method of the class: FieldDefinition{}
No Hooks.
Returns
null. Nothing (null).
Usage
$FieldDefinition = new FieldDefinition(); $FieldDefinition->__construct( $config );
- $config(FieldDefinitionConfig) (required)
- .
FieldDefinition::__construct() FieldDefinition:: construct code WC 10.9.1
public function __construct(array $config)
{
$this->name = $config['name'];
$this->resolveFn = $config['resolve'] ?? null;
$this->args = isset($config['args'])
? Argument::listFromConfig($config['args'])
: [];
$this->argsMapper = $config['argsMapper'] ?? null;
$this->description = $config['description'] ?? null;
$this->visible = $config['visible'] ?? true;
$this->deprecationReason = $config['deprecationReason'] ?? null;
$this->astNode = $config['astNode'] ?? null;
$this->complexityFn = $config['complexity'] ?? null;
$this->config = $config;
}