private function matchEdge(
        Str $name,
        RelationshipEdge $meta,
        $value,
        Query $query
    ): Query {
        if ($this->variables->contains((string) $name)) {
            return $query;
        }

        if ($this->variables->size() > 0) {
            $query = $query->with(...$this->variables->toPrimitive());
        }

        $this->variables = $this->variables->add((string) $name);

        return $query
            ->match((string) $name)
            ->withProperty(
                $meta->target(),
                (string) $name
                    ->prepend('{')
                    ->append('_props}.')
                    ->append($meta->target())
            )
            ->withParameter(
                (string) $name->append('_props'),
                [
                    $meta->target() => $value,
                ]
            );
    }