Skip to main content

nash_protocol/protocol/multi_request/
request.rs

1use std::collections::HashMap;
2use serde::{Serialize, Deserialize};
3
4/// The form in which queries are sent over HTTP in most implementations. This will be built using the [`GraphQLQuery`] trait normally.
5#[derive(Debug, Serialize, Deserialize)]
6pub struct DynamicQueryBody {
7    /// The values for the variables. They must match those declared in the queries. This should be the `Variables` struct from the generated module corresponding to the query.
8    pub variables: HashMap<String, serde_json::Value>,
9    /// The GraphQL query, as a string.
10    pub query: String,
11    /// The GraphQL operation name, as a string.
12    #[serde(rename = "operationName")]
13    pub operation_name: &'static str,
14}