pub struct Operation<QueryFragment, Variables = ()> {
pub query: String,
pub variables: Variables,
/* private fields */
}
Expand description
An Operation that can be sent to a remote GraphQL server.
This contains a GraphQL query string and variable HashMap. It can be
serialized into JSON with serde::Serialize
and sent to a remote server.
Fields
query: String
The graphql query string that will be sent to the server
variables: Variables
The variables that will be sent to the server as part of this operation
Implementations
sourceimpl<'de, Fragment, Variables> Operation<Fragment, Variables>where
Fragment: QueryFragment<'de>,
Variables: QueryVariables,
impl<'de, Fragment, Variables> Operation<Fragment, Variables>where
Fragment: QueryFragment<'de>,
Variables: QueryVariables,
sourcepub fn query(variables: Variables) -> Selfwhere
Fragment::SchemaType: QueryRoot,
pub fn query(variables: Variables) -> Selfwhere
Fragment::SchemaType: QueryRoot,
Constructs a new Operation for a query
sourcepub fn mutation(variables: Variables) -> Selfwhere
Fragment::SchemaType: MutationRoot,
pub fn mutation(variables: Variables) -> Selfwhere
Fragment::SchemaType: MutationRoot,
Constructs a new Operation for a mutation
Trait Implementations
Auto Trait Implementations
impl<QueryFragment, Variables> RefUnwindSafe for Operation<QueryFragment, Variables>where
Variables: RefUnwindSafe,
impl<QueryFragment, Variables> Send for Operation<QueryFragment, Variables>where
Variables: Send,
impl<QueryFragment, Variables> Sync for Operation<QueryFragment, Variables>where
Variables: Sync,
impl<QueryFragment, Variables> Unpin for Operation<QueryFragment, Variables>where
Variables: Unpin,
impl<QueryFragment, Variables> UnwindSafe for Operation<QueryFragment, Variables>where
Variables: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more