Skip to content

chore(platform-app): add the generated App Registry GraphQL client crate [DEVEX-1173] - #326

Open
jpage-godaddy wants to merge 1 commit into
app-registry-schemafrom
platform-app-client-crate
Open

jpage-godaddy wants to merge 1 commit into
app-registry-schemafrom
platform-app-client-crate

Conversation

@jpage-godaddy

Copy link
Copy Markdown
Collaborator

Summary

  • Adds platform-app-client, a typed client for the App Registry subgraph generated at build time by graphql_client from the pinned schema (feat(api): add App Registry to the browsable API catalog [DEVEX-1173] #325) and one .graphql document per operation (12 operations). It follows the generated-client pattern already used for domains/hosting/shopping/email, including the shared transport-observer bridge in generated-client-support.
  • Unset optional mutation inputs are omitted from the request instead of being sent as explicit null: the service treats an omitted field as "leave unchanged" and null as "clear". Covered by a wire-shape test in the follow-up PR.
  • Responses to credential-bearing operations (CreateApplication, which returns the client secret, webhook secret and public key) are never handed to the transport observer, so --debug transport cannot log them. A crate test fails if they leak.
  • Nothing in the CLI uses the crate yet, so there is no user-facing change.

Second of three PRs for DEVEX-1173. Stacked on #325; the migration that uses this crate is #282.

Test plan

  • cargo check --workspace
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace (including the crate's 4 tests)
  • cargo fmt --check
  • ./rust/scripts/check-module-size.sh

🤖 Generated with Claude Code

…ate [DEVEX-1173]

Adds platform-app-client, a typed client for the App Registry subgraph
generated at build time by graphql_client from the pinned schema and one
.graphql document per operation, matching the generated-client pattern used
for domains/hosting/shopping/email. It is not used by the CLI yet.

Unset optional mutation inputs are omitted from the request rather than sent
as explicit nulls, since the service treats an omitted field as "leave
unchanged" and a null as "clear". Responses to credential-bearing operations
(CreateApplication) are never shown to the transport observer, so
`--debug transport` cannot log the secrets they carry.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@jpage-godaddy
jpage-godaddy force-pushed the platform-app-client-crate branch from 57fbbe0 to b3f54ba Compare October 14, 2026 20:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Credential exposure paths and the inability to express explicit null updates remain unresolved.

3 open findings
What changed in this PR

Adds a generated App Registry client between the pinned-schema work (#325) and the CLI migration (#282). The CLI does not use it yet.

Changes:

  • Generates typed requests and responses for 12 GraphQL operations.
  • Adds authenticated transport, error handling, and credential-response safeguards.
  • Omits unset optional inputs and adds four client tests.
File Description
rust/​platform-app-client/​src/​lib.rs Client transport, errors, and tests.
rust/​platform-app-client/​graphql/​UpdateApplication.graphql Application updates.
rust/​platform-app-client/​graphql/​GenerateReleaseUploadUrl.graphql Artifact upload URL generation.
rust/​platform-app-client/​graphql/​EnabledStoreApplications.graphql Enabled store applications query.
rust/​platform-app-client/​graphql/​EnableApplication.graphql Store application enablement.
rust/​platform-app-client/​graphql/​DisableApplication.graphql Store application disablement.
rust/​platform-app-client/​graphql/​CreateRelease.graphql Release creation.
rust/​platform-app-client/​graphql/​CreateApplication.graphql Application creation with credentials.
rust/​platform-app-client/​graphql/​ArchiveApplication.graphql Application archival.
rust/​platform-app-client/​graphql/​ApplicationWithLatestRelease.graphql Application and latest release query.
rust/​platform-app-client/​graphql/​ApplicationsList.graphql Application listing with status filtering.
rust/​platform-app-client/​graphql/​Application.graphql Application lookup.
rust/​platform-app-client/​graphql/​ActivateRelease.graphql Release activation.
rust/​platform-app-client/​Cargo.toml New client crate dependencies.
rust/​platform-app-client/​build.rs Type generation and optional-input serialization.
rust/​Cargo.toml Registers the workspace member.
rust/​Cargo.lock Locks client and code-generation dependencies.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

/// the client secret, webhook secret and public key). Their response bodies
/// are never handed to the transport observer, so `--debug transport` cannot
/// write them into a trace.
const SECRET_RESPONSE_OPERATIONS: &[&str] = &["CreateApplication"];
Comment on lines +128 to +131
body: format!(
"invalid JSON response: {e} (body: {})",
String::from_utf8_lossy(&bytes)
),
Comment on lines +42 to +45
if is_option(&field.ty) {
field.attrs.push(syn::parse_quote!(
#[serde(skip_serializing_if = "Option::is_none")]
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants