src/Schema/Factories/NodeFactory.php
protected function resolveType(TypeDefinitionNode $typeDefinition): Type
    {
        // Ignore TypeExtensionNode since they are merged before we get here
        switch (get_class($typeDefinition)) {
            case EnumTypeDefinitionNode::class:
                return $this->resolveEnumType($typeDefinition);
            case ScalarTypeDefinitionNode::class:
                return $this->resolveScalarType($typeDefinition);
            case ObjectTypeDefinitionNode::class:
                return $this->resolveObjectType($typeDefinition);
            case InputObjectTypeDefinitionNode::class:
                return $this->resolveInputObjectType($typeDefinition);
            case InterfaceTypeDefinitionNode::class:
                return $this->resolveInterfaceType($typeDefinition);
            case UnionTypeDefinitionNode::class:
                return $this->resolveUnionType($typeDefinition);
            default:
                throw new InvariantViolation(
                    "Unknown type for definition [{$typeDefinition->name->value}]"
                );
        }
    }
protected function resolveType(TypeDefinitionNode $typeDefinition): Type
    {
        // Ignore TypeExtensionNode since they are merged before we get here
        switch (get_class($typeDefinition)) {
            case EnumTypeDefinitionNode::class:
                return $this->resolveEnumType($typeDefinition);
            case ScalarTypeDefinitionNode::class:
                return $this->resolveScalarType($typeDefinition);
            case ObjectTypeDefinitionNode::class:
                return $this->resolveObjectType($typeDefinition);
            case InputObjectTypeDefinitionNode::class:
                return $this->resolveInputObjectType($typeDefinition);
            case InterfaceTypeDefinitionNode::class:
                return $this->resolveInterfaceType($typeDefinition);
            case UnionTypeDefinitionNode::class:
                return $this->resolveUnionType($typeDefinition);
            default:
                throw new InvariantViolation(
                    "Unknown type for definition [{$typeDefinition->name->value}]"
                );
        }
    }
protected function resolveType ( TypeDefinitionNode $ typeDefinition ) : Type { // Ignore TypeExtensionNode since they are merged before we get here switch ( get_class ( $ typeDefinition ) ) { case EnumTypeDefinitionNode :: class : return $ this -> resolveEnumType ( $ typeDefinition ) ; case ScalarTypeDefinitionNode :: class : return $ this -> resolveScalarType ( $ typeDefinition ) ; case ObjectTypeDefinitionNode :: class : return $ this -> resolveObjectType ( $ typeDefinition ) ; case InputObjectTypeDefinitionNode :: class : return $ this -> resolveInputObjectType ( $ typeDefinition ) ; case InterfaceTypeDefinitionNode :: class : return $ this -> resolveInterfaceType ( $ typeDefinition ) ; case UnionTypeDefinitionNode :: class : return $ this -> resolveUnionType ( $ typeDefinition ) ; default : throw new InvariantViolation ( "Unknown type for definition [{$typeDefinition->name->value}]" ) ; } }
Transform value to type.

@param  \GraphQL\Language\AST\TypeDefinitionNode  $typeDefinition
@return \GraphQL\Type\Definition\Type

@throws \Nuwave\Lighthouse\Exceptions\DefinitionException
Transform value to type .