<?php

declare (strict_types=1);
namespace PoP\GraphQLParser\Spec\Parser\Ast;

/** @internal */
class LeafField extends \PoP\GraphQLParser\Spec\Parser\Ast\AbstractField
{
    /**
     * Indicate if a field equals another one based on its properties,
     * not on its object hash ID.
     *
     * Watch out: `{ title: title }` is equivalent to `{ title }`
     *
     * @see https://spec.graphql.org/draft/#sec-Field-Selection-Merging
     */
    public function isEquivalentTo(\PoP\GraphQLParser\Spec\Parser\Ast\LeafField $leafField) : bool
    {
        return $this->doIsEquivalentTo($leafField);
    }
}
