Youshido\GraphQL\Type\TypeService::isInputObjectType PHP Method

isInputObjectType() public static method

public static isInputObjectType ( $type )
    public static function isInputObjectType($type)
    {
        return $type instanceof AbstractInputObjectType;
    }

Usage Example

コード例 #1
0
ファイル: ResolveValidator.php プロジェクト: youshido/graphql
 public function assetTypeHasField(AbstractType $objectType, AstFieldInterface $ast)
 {
     /** @var AbstractObjectType $objectType */
     if (!(TypeService::isObjectType($objectType) || TypeService::isInputObjectType($objectType)) || !$objectType->hasField($ast->getName())) {
         throw new ResolveException(sprintf('Field "%s" not found in type "%s"', $ast->getName(), $objectType->getNamedType()->getName()), $ast->getLocation());
     }
 }
All Usage Examples Of Youshido\GraphQL\Type\TypeService::isInputObjectType