pub struct GraphQLRequest {
pub query: String,
pub operation_name: Option<String>,
pub variables: Option<HashMap<String, Value>>,
pub extensions: Option<HashMap<String, Value>>,
}Expand description
GraphQL request
Fields§
§query: StringGraphQL query string
operation_name: Option<String>Operation name (for multi-operation documents)
variables: Option<HashMap<String, Value>>Query variables
extensions: Option<HashMap<String, Value>>Extensions
Implementations§
Source§impl GraphQLRequest
impl GraphQLRequest
Sourcepub fn with_operation(self, name: impl Into<String>) -> Self
pub fn with_operation(self, name: impl Into<String>) -> Self
Set operation name
Sourcepub fn with_variables(self, vars: HashMap<String, Value>) -> Self
pub fn with_variables(self, vars: HashMap<String, Value>) -> Self
Set variables
Trait Implementations§
Source§impl Clone for GraphQLRequest
impl Clone for GraphQLRequest
Source§fn clone(&self) -> GraphQLRequest
fn clone(&self) -> GraphQLRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GraphQLRequest
impl RefUnwindSafe for GraphQLRequest
impl Send for GraphQLRequest
impl Sync for GraphQLRequest
impl Unpin for GraphQLRequest
impl UnsafeUnpin for GraphQLRequest
impl UnwindSafe for GraphQLRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more