finds.dev

graphql-rust/graphql-client

Typed, correct GraphQL requests and responses in Rust

View on GitHub

★ 1,261RustApache-2.0updated Jul 2026

// the take

graphql-client generates typed Rust structs from your GraphQL schema and query files at compile time, giving you serde-ready request/response types without hand-rolling them. It's for Rust projects that talk to GraphQL APIs and want the compiler to catch shape mismatches before runtime. Works in native and WASM targets.

The compile-time codegen approach means type errors between your query and schema are caught at `cargo build`, not in production. Support for unions, interfaces, and fragments is real — not bolted on as an afterthought, as evidenced by the dedicated test files for each. The `@deprecated` field handling that can be set to `deny` is a nice touch that turns schema drift into a hard build error. WASM support is first-class and the web example is a working proof, not a theoretical footnote.

Custom scalars require manual type aliases in scope, which is fiddly and produces opaque build errors if you forget — the error message points at generated code, not your query file. Subscriptions are handled for codegen only; you're on your own for the runtime transport layer and have to pull in a separate crate. The project has had slow maintenance periods and the CHANGELOG shows long gaps, so you may be stuck waiting for GraphQL spec additions to be supported. Build times take a hit for any crate using proc macros heavily, and complex schemas with many operations will make this noticeable.

We read the README, the directory tree and a key source file in July 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
1,261
Forks
176
Language
Rust
License
Apache-2.0
Last commit
19 Jul 2026

// nearby

If graphql-client isn't quite it.

All repos →