edgeType = new EdgeType($ownerType, $nodeType, $pivotType); $this->edgeConnectionType = new EdgeConnectionType($this->edgeType); GraphQL::addType($this->edgeConnectionType, $this->edgeConnectionType->getName()); parent::__construct(new $nodeType, $relationName); } /** * Get the edge type of the belongs to many relationship. */ public function getEdgeType(): EdgeType { return $this->edgeType; } /** * The type returned by the field. */ public function type(): Type { return GraphQL::type($this->edgeConnectionType->getName()); } /** * The pagination type if applicable. */ public function paginationType(): PaginationType { return PaginationType::CONNECTION; } }