Youshido\GraphQL\Field\Field::getType PHP Méthode

getType() public méthode

public getType ( ) : AbstractObjectType
Résultat Youshido\GraphQL\Type\Object\AbstractObjectType
    public function getType()
    {
        return $this->_typeCache ? $this->_typeCache : ($this->_typeCache = $this->getConfigValue('type'));
    }

Usage Example

Exemple #1
0
 /**
  * @param Field                 $intField
  * @param Field                 $objField
  * @param AbstractInterfaceType $interface
  *
  * @return bool
  *
  * @throws ConfigurationException
  */
 protected function assertFieldsIdentical($intField, $objField, AbstractInterfaceType $interface)
 {
     $isValid = true;
     if ($intField->getType()->isCompositeType() !== $objField->getType()->isCompositeType()) {
         $isValid = false;
     }
     if ($intField->getType()->getNamedType()->getName() != $objField->getType()->getNamedType()->getName()) {
         $isValid = false;
     }
     if (!$isValid) {
         throw new ConfigurationException(sprintf('Implementation of %s is invalid for the field %s', $interface->getName(), $objField->getName()));
     }
 }