Backend: Expose secrets count via GraphQL for project delete/transfer warning
## Why are we doing this work To display an explicit warning with the number of secrets that will be lost during a project delete or transfer, the backend needs to expose a secrets count endpoint. This is a prerequisite for the frontend warning in #583210. ## Relevant links - #583210 - Display explicit secret loss warning on project delete/transfer (parent issue) ## Non-functional requirements - [ ] Documentation: - [ ] Feature flag: - [ ] Performance: - [ ] Testing: ## Implementation plan - Expose `SecretsManagerClient#count_secrets` in the Rails backend - Add `project_secrets_count` and `group_secrets_count` fields to the GraphQL API: ```ruby # ee/app/graphql/types/query_type.rb field :project_secrets_count, GraphQL::Types::Int, null: true, description: 'Total number of secrets in a project.' do argument :project_path, GraphQL::Types::ID, required: true, description: 'Full path of the project.' end field :group_secrets_count, GraphQL::Types::Int, null: true, description: 'Total number of secrets in a group.' do argument :group_path, GraphQL::Types::ID, required: true, description: 'Full path of the group.' end ``` ## Verification steps - Query `project_secrets_count` via GraphQL and confirm it returns the correct count for a project with secrets - Query `group_secrets_count` via GraphQL and confirm it returns the correct count for a group with secrets
issue