public function __construct($config)
{
if (!isset($config['name'])) {
$config['name'] = $this->tryInferName();
}
Config::validate($config, ['name' => Config::NAME | Config::REQUIRED, 'types' => Config::arrayOf(Config::OBJECT_TYPE, Config::MAYBE_THUNK | Config::REQUIRED), 'resolveType' => Config::CALLBACK, 'description' => Config::STRING]);
/**
* Optionally provide a custom type resolver function. If one is not provided,
* the default implemenation will call `isTypeOf` on each implementing
* Object type.
*/
$this->name = $config['name'];
$this->description = isset($config['description']) ? $config['description'] : null;
$this->config = $config;
}