private function parseUnionTypeDefinition()
    {
        $start       = $this->lexer->token;
        $description = $this->parseDescription();
        $this->expectKeyword('union');
        $name       = $this->parseName();
        $directives = $this->parseDirectives(true);
        $types      = $this->parseUnionMemberTypes();

        return new UnionTypeDefinitionNode([
            'name'        => $name,
            'directives'  => $directives,
            'types'       => $types,
            'loc'         => $this->loc($start),
            'description' => $description,
        ]);
    }
private function parseUnionTypeDefinition()
    {
        $start       = $this->lexer->token;
        $description = $this->parseDescription();
        $this->expectKeyword('union');
        $name       = $this->parseName();
        $directives = $this->parseDirectives(true);
        $types      = $this->parseUnionMemberTypes();

        return new UnionTypeDefinitionNode([
            'name'        => $name,
            'directives'  => $directives,
            'types'       => $types,
            'loc'         => $this->loc($start),
            'description' => $description,
        ]);
    }
private function parseUnionTypeDefinition ( ) { $ start = $ this -> lexer -> token ; $ description = $ this -> parseDescription ( ) ; $ this -> expectKeyword ( 'union' ) ; $ name = $ this -> parseName ( ) ; $ directives = $ this -> parseDirectives ( true ) ; $ types = $ this -> parseUnionMemberTypes ( ) ; return new UnionTypeDefinitionNode ( [ 'name' => $ name , 'directives' => $ directives , 'types' => $ types , 'loc' => $ this -> loc ( $ start ) , 'description' => $ description , ] ) ; }
UnionTypeDefinition :
- Description? union Name Directives[Const]? UnionMemberTypes?

@return UnionTypeDefinitionNode

@throws SyntaxError
UnionTypeDefinition : - Description? union Name Directives [ Const ] ? UnionMemberTypes?