Use the Flaps app lookup instead of the full GraphQL GetApp query - #5181
Merged
Conversation
The fly-go GetApp GraphQL query fetches every field on an app, including
the full config of every machine, but the flyctl callers only read the
app name, the organization slug, and the internal numeric ID. All of
those are returned by the Flaps GET /apps/{name} endpoint, which flyctl
already calls elsewhere.
Switch `apps destroy`, `apps move`, `mcp destroy`, the launch existence
check, and the Tigris statics deployer to the Flaps app. The statics
package now takes a *flaps.App, and MoveBucket takes the release version
explicitly; `apps move` fetches it with the small current-release query
only when there is a bucket to move.
`apps move` no longer goes through App.Compact() to build the agent
tunnel. That copy never carried the app network because the GraphQL
query did not fetch it, so apps on custom networks now dial correctly.
The only remaining caller of the full query is `apps create --json`,
which renders the whole struct as output.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DMttEkUAVhL7YZFRFjhHwB
Flaps reports an organization's default network as "default", while the web API and the WireGuard peer mutation identify it by an empty name. Passing the Flaps value straight into the agent tunnel failed with "is not a valid network for organization" for every app on the default network. Add flapsutil.NetworkName to translate it, and BuildContextForApp to apply that for apps fetched through Flaps. Flaps also reports the raw org slug rather than the "personal" alias, so the no-op check in apps move now compares against both. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DMttEkUAVhL7YZFRFjhHwB
lillianberryfly
force-pushed
the
lillian/trim-graphql-get-app
branch
from
September 8, 2026 14:55
7fe0eb8 to
7e5cedd
Compare
Flaps reports the personal organization by its raw slug while the GraphQL API and the agent's tunnel keys use the "personal" alias, so a client that dialed with the Flaps slug got "no such organization". The agent now matches either slug when establishing a tunnel and remembers the alias, so later lookups that carry only the slug the client used find the same tunnel. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DMttEkUAVhL7YZFRFjhHwB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The fly-go GetApp GraphQL query fetches every field on an app, including the full config of every machine, but the flyctl callers only read the app name, the organization slug, and the internal numeric ID. All of those are returned by the Flaps GET /apps/{name} endpoint, which flyctl already calls elsewhere.
Switch
apps destroy,apps move,mcp destroy, the launch existence check, and the Tigris statics deployer to the Flaps app. The statics package now takes a *flaps.App, and MoveBucket takes the release version explicitly;apps movefetches it with the small current-release query only when there is a bucket to move.apps moveno longer goes through App.Compact() to build the agent tunnel. That copy never carried the app network because the GraphQL query did not fetch it, so apps on custom networks now dial correctly.The only remaining caller of the full query is
apps create --json, which renders the whole struct as output.Claude-Session: https://claude.ai/code/session_01DMttEkUAVhL7YZFRFjhHwB