Skip to content

Type recursion #742

@drmax24

Description

@drmax24

I have a GroupType

#[GQL\Type(name: self::GQL_TYPE)]
class CommunityGroupType extends BaseTypeWithID
{
    public const GQL_TYPE = 'CommunityGroup';

    ...

    public readonly ?float $starRating;
    #[GQL\Field]
    public readonly ?CommunityGroupType $originalGroup;

As you can see, the group has originalGroup.
The original group has the same fields as the group, but some values can differ.

One thing I don't like is that original group will have another originalGroup inside of the graphql type.
Any suggestions? I would like originalGroup not to have originalGroup inside

group->originalGroup->originalGroup

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions