src/Schema/AST/DocumentAST.php
public function typeDefinitions(): Collection
    {
        return $this->definitionMap
            ->filter(function (DefinitionNode $node) {
                return $node instanceof ScalarTypeDefinitionNode
                    || $node instanceof ObjectTypeDefinitionNode
                    || $node instanceof InterfaceTypeDefinitionNode
                    || $node instanceof UnionTypeDefinitionNode
                    || $node instanceof EnumTypeDefinitionNode
                    || $node instanceof InputObjectTypeDefinitionNode;
            });
    }
public function typeDefinitions(): Collection
    {
        return $this->definitionMap
            ->filter(function (DefinitionNode $node) {
                return $node instanceof ScalarTypeDefinitionNode
                    || $node instanceof ObjectTypeDefinitionNode
                    || $node instanceof InterfaceTypeDefinitionNode
                    || $node instanceof UnionTypeDefinitionNode
                    || $node instanceof EnumTypeDefinitionNode
                    || $node instanceof InputObjectTypeDefinitionNode;
            });
    }
public function typeDefinitions ( ) : Collection { return $ this -> definitionMap -> filter ( function ( DefinitionNode $ node ) { return $ node instanceof ScalarTypeDefinitionNode || $ node instanceof ObjectTypeDefinitionNode || $ node instanceof InterfaceTypeDefinitionNode || $ node instanceof UnionTypeDefinitionNode || $ node instanceof EnumTypeDefinitionNode || $ node instanceof InputObjectTypeDefinitionNode ; } ) ; }
Get all type definitions from the document.

@return \Illuminate\Support\Collection<\GraphQL\Language\AST\TypeDefinitionNode>
Get all type definitions from the document .