Struct apollo_compiler::executable::Operation
source · pub struct Operation {
pub operation_type: OperationType,
pub name: Option<Name>,
pub variables: Vec<Node<VariableDefinition>>,
pub directives: DirectiveList,
pub selection_set: SelectionSet,
}
Fields§
§operation_type: OperationType
§name: Option<Name>
§variables: Vec<Node<VariableDefinition>>
§directives: DirectiveList
§selection_set: SelectionSet
Implementations§
source§impl Operation
impl Operation
sourcepub fn object_type(&self) -> &NamedType
pub fn object_type(&self) -> &NamedType
Returns the name of the schema type this operation selects against.
sourcepub fn is_mutation(&self) -> bool
pub fn is_mutation(&self) -> bool
Returns true if this is a mutation operation.
sourcepub fn is_subscription(&self) -> bool
pub fn is_subscription(&self) -> bool
Returns true if this is a subscription operation.
sourcepub fn is_introspection(&self, document: &ExecutableDocument) -> bool
pub fn is_introspection(&self, document: &ExecutableDocument) -> bool
Return whether this operation is a query that only selects introspection meta-fields:
__type
, __schema
, and __typename
Trait Implementations§
source§impl PartialEq for Operation
impl PartialEq for Operation
impl Eq for Operation
impl StructuralPartialEq for Operation
Auto Trait Implementations§
impl RefUnwindSafe for Operation
impl Send for Operation
impl Sync for Operation
impl Unpin for Operation
impl UnwindSafe for Operation
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.