public function __construct($type) { Utils::invariant($type instanceof Type || is_callable($type), 'Expecting instance of GraphQL\\Type\\Definition\\Type or callable returning instance of that class'); $this->ofType = $type; }