finds.dev← search

// the find

graphql-rust/graphql-client

★ 1,261 · Rust · Apache-2.0 · updated Jul 2026

Typed, correct GraphQL requests and responses in Rust

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.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →