resolveDirectives( $this->relation()->getDirective([ 'relation' => $this->relationName, 'edgeType' => $this->edgeType, ]) ); return Str::of($this->field ?? $this->relationName) ->append(': ') ->append($this->type()->toString()) ->append(' ') ->append($directives) ->toString(); } /** * The type returned by the field. * * @return Type */ abstract protected function type(): Type; /** * The Relation type. * * @return RelationType */ protected function relation(): RelationType { return RelationType::BELONGS_TO_MANY; } }