- ~2,400lines across the client, query and type modules
A typed client for a GPU provider
GraphQL appears in one place: the cloud GPU provider integration inside the provisioning layer of my execution substrate, FAFO Core and Function Forge. I have a typed Rust client for that provider's GraphQL API.
Pod lifecycle goes over the same provider's REST API; the GraphQL client remains in the crate.
I chose REST for the pod path where the provider's REST interface was simpler, instead of keeping GraphQL for its own sake.
This is a well-typed client against a vendor's schema, not GraphQL server or schema design.
Typed failures, bounded retry
GraphQL errors are parsed with their field paths and mapped to typed errors rather than matched as strings, so the provisioning layer can tell "no capacity" from "bad credentials" and react differently. Retry is bounded, with capped exponential backoff, rather than unbounded against a paid API.