use gloo_net::{http::Request, Error}; use graphql_client::GraphQLQuery; use serde::{de::DeserializeOwned, Serialize}; // The paths are relative to the directory where your `Cargo.toml` is located. // Both json and the GraphQL schema language are supported as sources for the schema #[derive(GraphQLQuery)] #[graphql( schema_path = "graphql/schema.json", query_path = "graphql/front_page.graphql", response_derives = "Debug" )] pub struct FrontPageQuery; #[derive(GraphQLQuery)] #[graphql( schema_path = "graphql/schema.json", query_path = "graphql/show_thread.graphql", response_derives = "Debug" )] pub struct ShowThreadQuery; #[derive(GraphQLQuery)] #[graphql( schema_path = "graphql/schema.json", query_path = "graphql/mark_read.graphql", response_derives = "Debug" )] pub struct MarkReadMutation; pub async fn send_graphql
(body: Body) -> Result