From 0fac9780c7b91a95a0557d6d246a629bb15817e3 Mon Sep 17 00:00:00 2001 From: Divya Singh Date: Wed, 12 Aug 2026 18:20:06 +0530 Subject: [PATCH 1/2] fix(platform): list apps across all App Registry statuses App Registry defaults applications list to ACTIVE-only when status is omitted. Pass an explicit status.in of every ApplicationStatus so `gddy platform app list` returns all visible apps by default. DEVX-837 Co-authored-by: Cursor --- rust/src/application/client.rs | 63 +++++++++++++++++++++++++-- rust/src/application/commands/list.rs | 14 +++++- 2 files changed, 71 insertions(+), 6 deletions(-) diff --git a/rust/src/application/client.rs b/rust/src/application/client.rs index 8e9d7a78..f30d78b8 100644 --- a/rust/src/application/client.rs +++ b/rust/src/application/client.rs @@ -5,6 +5,18 @@ use serde_json::{Value, json}; const GRAPHQL_PATH: &str = "/v1/apps/app-registry-subgraph"; const USER_AGENT: &str = concat!("godaddy-cli/", env!("CARGO_PKG_VERSION")); +/// App Registry `ApplicationStatus` enum values (see app-registry-api GraphQL schema). +/// +/// The `applications` query defaults to ACTIVE-only when `status` is omitted, so +/// callers that want every app must pass an explicit `status.in` containing these. +pub const APPLICATION_STATUSES: &[&str] = &[ + "ACTIVE", + "ARCHIVED", + "BLOCKED", + "INACTIVE", + "VERIFYING", +]; + /// Builds a reqwest Client with the standard GoDaddy CLI User-Agent. pub fn make_http_client() -> Client { Client::builder() @@ -132,11 +144,18 @@ impl ApplicationClient { Ok(payload["data"].clone()) } + /// Lists applications across every App Registry status. + /// + /// Always sends an explicit `status.in` of [`APPLICATION_STATUSES`]. Omitting + /// the GraphQL `status` argument is *not* equivalent: the API defaults to + /// ACTIVE-only. pub async fn list_applications(&self) -> Result { - let data = self.query(json!({ - "query": "query ApplicationsList { applications { edges { node { id label name description status url proxyUrl } } } }" - })) - .await?; + let data = self + .query(json!({ + "query": "query ApplicationsList($status: ApplicationStatusFilter) { applications(status: $status) { edges { node { id label name description status url proxyUrl } } } }", + "variables": { "status": { "in": APPLICATION_STATUSES } } + })) + .await?; let nodes: Vec = data["applications"]["edges"] .as_array() .map(|edges| { @@ -410,6 +429,42 @@ mod tests { assert!(err.to_string().contains("definitely-not-a-real-env-xyz")); } + #[tokio::test] + async fn list_applications_sends_all_app_registry_statuses() { + let server = MockServer::start_async().await; + let mock = server + .mock_async(|when, then| { + when.method(POST) + .path("/v1/apps/app-registry-subgraph") + .header("authorization", "Bearer test-token") + .is_true(|req| { + let body = req.body_string(); + body.contains("ApplicationsList") + && body.contains(r#""in":["ACTIVE","ARCHIVED","BLOCKED","INACTIVE","VERIFYING"]"#) + }); + then.status(200).json_body(json!({ + "data": { + "applications": { + "edges": [ + { "node": { "id": "a1", "name": "active-app", "status": "ACTIVE" } }, + { "node": { "id": "a2", "name": "inactive-app", "status": "INACTIVE" } } + ] + } + } + })); + }) + .await; + + let data = ApplicationClient::new(server.base_url(), "test-token") + .list_applications() + .await + .expect("list applications"); + + mock.assert_async().await; + assert_eq!(data.as_array().expect("array").len(), 2); + assert_eq!(data[1]["status"], "INACTIVE"); + } + #[tokio::test] async fn activate_release_posts_mutation_with_ids() { let server = MockServer::start_async().await; diff --git a/rust/src/application/commands/list.rs b/rust/src/application/commands/list.rs index ccb308e3..74072ffd 100644 --- a/rust/src/application/commands/list.rs +++ b/rust/src/application/commands/list.rs @@ -12,8 +12,9 @@ pub(super) fn command() -> RuntimeCommandSpec { CommandSpec::new("list", "List all applications") .with_long( "List all GoDaddy developer-platform applications visible to \ - the current account. Use `gddy platform app info --name ` \ - to fetch full details for a single application.", + the current account, across every App Registry status. Use \ + `gddy platform app info --name ` to fetch full details \ + for a single application.", ) .with_system("applications") .with_tier(Tier::Read) @@ -49,6 +50,7 @@ mod tests { use cli_engine::{Cli, CliConfig, PaginationConfig, Stage}; use super::command; + use crate::application::client::APPLICATION_STATUSES; #[test] fn command_opts_into_pagination_with_no_default_and_a_max_limit() { @@ -61,6 +63,14 @@ mod tests { ); } + #[test] + fn application_statuses_match_app_registry_enum() { + assert_eq!( + APPLICATION_STATUSES, + ["ACTIVE", "ARCHIVED", "BLOCKED", "INACTIVE", "VERIFYING"] + ); + } + /// API commands must stay fail-closed: `platform app list` calls the backend, /// so it must require authentication. Built with **no auth provider /// registered**, the engine's default `AuthRequirement::Required` must reject From 53223cb7023e96e6df2582f59c85b6dc10140b0b Mon Sep 17 00:00:00 2001 From: Divya Singh Date: Wed, 12 Aug 2026 18:24:02 +0530 Subject: [PATCH 2/2] style: rustfmt APPLICATION_STATUSES for CI fmt check Co-authored-by: Cursor --- rust/src/application/client.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/rust/src/application/client.rs b/rust/src/application/client.rs index f30d78b8..137cda9b 100644 --- a/rust/src/application/client.rs +++ b/rust/src/application/client.rs @@ -9,13 +9,8 @@ const USER_AGENT: &str = concat!("godaddy-cli/", env!("CARGO_PKG_VERSION")); /// /// The `applications` query defaults to ACTIVE-only when `status` is omitted, so /// callers that want every app must pass an explicit `status.in` containing these. -pub const APPLICATION_STATUSES: &[&str] = &[ - "ACTIVE", - "ARCHIVED", - "BLOCKED", - "INACTIVE", - "VERIFYING", -]; +pub const APPLICATION_STATUSES: &[&str] = + &["ACTIVE", "ARCHIVED", "BLOCKED", "INACTIVE", "VERIFYING"]; /// Builds a reqwest Client with the standard GoDaddy CLI User-Agent. pub fn make_http_client() -> Client {