src/Schema/AST/DocumentAST.php
public function objectTypeDefinition(string $name): ?ObjectTypeDefinitionNode
    {
        return $this->objectTypeDefinitions()
            ->first(function (ObjectTypeDefinitionNode $objectType) use ($name): bool {
                return $objectType->name->value === $name;
            });
    }
public function objectTypeDefinition(string $name): ?ObjectTypeDefinitionNode
    {
        return $this->objectTypeDefinitions()
            ->first(function (ObjectTypeDefinitionNode $objectType) use ($name): bool {
                return $objectType->name->value === $name;
            });
    }
public function objectTypeDefinition ( string $ name ) : ? ObjectTypeDefinitionNode { return $ this -> objectTypeDefinitions ( ) -> first ( function ( ObjectTypeDefinitionNode $ objectType ) use ( $ name ) : bool { return $ objectType -> name -> value === $ name ; } ) ; }
Get a single object type definition by name.

@param  string  $name
@return \GraphQL\Language\AST\ObjectTypeDefinitionNode|null
Get a single object type definition by name .