Пример #1
0
 /**
  * @param $value
  * @param ResolveInfo $info
  * @return Type|null
  * @throws \Exception
  */
 public function getObjectType($value, ResolveInfo $info)
 {
     $resolver = $this->_resolveTypeFn;
     return $resolver ? call_user_func($resolver, $value, $info) : Type::getTypeOf($value, $info, $this);
 }
Пример #2
0
 /**
  * @param ObjectType $value
  * @return Type
  */
 public function resolveType($value)
 {
     $resolver = $this->_resolveType;
     return $resolver ? call_user_func($resolver, $value) : Type::getTypeOf($value, $this);
 }