spark-graphql-client
A lightweight and flexible GraphQL client for Rust.
This crate provides a simple client for executing GraphQL queries and mutations against a GraphQL endpoint. It handles request building, optional payload compression (using Zstd), and response decompression and parsing.
Note: This client expects GraphQL queries and mutations to be provided as raw string literals. It does not work with pre-generated query types or builders.
Features
- Basic GraphQL query and mutation execution.
- Support for variables in GraphQL requests.
- Optional Zstd payload compression.
- Automatic response decompression (Zstd).
- Configurable base URL and user agent.
Limitations
This client is intentionally lightweight and does not implement the full GraphQL specification.
It focuses primarily on sending requests and parsing the data part of the response.
Features like subscriptions, complex error handling beyond HTTP status, or automatic
fragment expansion are not included.
Example
use HashMap;
use Deserialize;
use ;
async