<?php

declare(strict_types=1);

namespace App\Framework\GraphQL\Attributes;

use Attribute;

/**
 * Marks a class as a GraphQL Type
 *
 * Type name is auto-detected from class name (removes "Type" suffix if present)
 *
 * Usage:
 * #[GraphQLType(description: 'A user in the system')]
 * final readonly class UserType { ... }  // GraphQL type: User
 *
 * #[GraphQLType(description: 'User input for creation', isInput: true)]
 * final readonly class CreateUserInput { ... }  // GraphQL input: CreateUserInput
 */
#[Attribute(Attribute::TARGET_CLASS)]
final readonly class GraphQLType
{
    public function __construct(
        public ?string $description = null,
        public bool $isInterface = false,
        public bool $isInput = false
    ) {
    }
}
