Skip to content

Use Flaps for app and region lookups that only read Flaps-available f… - #5182

Merged
lillianberryfly merged 2 commits into
lillian/trim-graphql-get-appfrom
lillian/flaps-drop-in-replacements
Sep 8, 2026
Merged

Use Flaps for app and region lookups that only read Flaps-available f…#5182
lillianberryfly merged 2 commits into
lillian/trim-graphql-get-appfrom
lillian/flaps-drop-in-replacements

Conversation

@lillianberryfly

Copy link
Copy Markdown
Contributor

…ields

Many commands fetched an app through the GraphQL GetAppCompact or GetAppBasic queries but only read the name, organization slug, network, or Postgres role, all of which the Flaps GET /apps/{name} endpoint returns. Switch those callers to the Flaps client, and add a small flapsutil.IsPostgresApp helper for the app_role check.

Regions move to the Flaps /platform/regions endpoint everywhere, including the cached list in the prompt package. It returns the same fly.Region type plus the nearest region code, so the nearest-region lookup for unattached volumes uses it too.

Org-scoped app completion lists apps through Flaps by org slug, and the launch Postgres planner checks for an existing database app with one Flaps lookup instead of listing every visible app.

Callers that feed the app or org GraphQL ID into a mutation, such as SSH certificate issuance through flypg, stay on GraphQL.

Claude-Session: https://claude.ai/code/session_01DMttEkUAVhL7YZFRFjhHwB

@lillianberryfly
lillianberryfly force-pushed the lillian/flaps-drop-in-replacements branch from 7f709c6 to 2f313e7 Compare September 7, 2026 18:49
@lillianberryfly
lillianberryfly force-pushed the lillian/flaps-drop-in-replacements branch from 2f313e7 to 23489b0 Compare September 8, 2026 14:55
lillianberryfly and others added 2 commits September 8, 2026 16:16
…ields

Many commands fetched an app through the GraphQL GetAppCompact or
GetAppBasic queries but only read the name, organization slug, network,
or Postgres role, all of which the Flaps GET /apps/{name} endpoint
returns. Switch those callers to the Flaps client, and add a small
flapsutil.IsPostgresApp helper for the app_role check.

Regions move to the Flaps /platform/regions endpoint everywhere,
including the cached list in the prompt package. It returns the same
fly.Region type plus the nearest region code, so the nearest-region
lookup for unattached volumes uses it too.

Org-scoped app completion lists apps through Flaps by org slug, and the
launch Postgres planner checks for an existing database app with one
Flaps lookup instead of listing every visible app.

Callers that feed the app or org GraphQL ID into a mutation, such as
SSH certificate issuance through flypg, stay on GraphQL.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DMttEkUAVhL7YZFRFjhHwB
Use apps.BuildContextForApp and flapsutil.NetworkName at every site that
opens an agent tunnel from a Flaps app, so apps on the org's default
network get the empty network name the WireGuard API expects.

tokens list compares the Flaps org slug against both the raw slug and the
"personal" alias of the selected org.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DMttEkUAVhL7YZFRFjhHwB
@lillianberryfly
lillianberryfly force-pushed the lillian/flaps-drop-in-replacements branch from 23489b0 to e17a506 Compare September 8, 2026 16:17
@lillianberryfly
lillianberryfly merged commit 7845aeb into master Sep 8, 2026
25 of 32 checks passed
@lillianberryfly
lillianberryfly deleted the lillian/flaps-drop-in-replacements branch September 8, 2026 16:43
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.

1 participant