Generating client types
gurafi does not ship a client generator. It produces a standard GraphQL schema, which is the
input every GraphQL client generator expects. Export SDL or introspection once, then generate
types with the tool for the client's language.
Export the schema
For stable diffs:
Start the server and use GraphiQL's schema tab, or POST an introspection query to /graphql.
suku serves introspection by default; disable it in production if the schema is private.
Rust clients
For a Rust client, use a GraphQL client crate that accepts a schema file and a .graphql query
document. The schema file is exactly the SDL printed above. Keep queries under version control
next to the client code.
Other languages
TypeScript, Swift, Kotlin, Java and Python generators consume either SDL or introspection JSON. The GraphQL schema is the contract; no Rust-specific metadata is required.
Schema evolution
A generated client breaks when a field or type is removed or a type changes incompatibly. Use
gql::diff in CI:
See Printing schemas for diffing, merging and public/internal variants.
Relay clients
For Relay, use gurafi-relay on the server. Relay's compiler expects global IDs, Node,
connections and mutation payloads; the crate generates those shapes with explicit type names. See
Relay.
