pub struct MixedDocument {
pub definitions: Vec<MixedDefinition>,
}Expand description
A document that contains both schema and executable definitions, preserving their original order.
This is useful for tools that process complete GraphQL codebases where
schema definitions and operations may be interleaved. Unlike separate
schema/executable document types, MixedDocument preserves the exact
ordering of definitions as they appeared in the source.
§Example
A file containing interleaved type definitions and queries:
type User {
id: ID!
name: String
}
query GetUser($id: ID!) {
user(id: $id) { name }
}
type Post {
id: ID!
author: User!
}The definitions vector will contain [User type, GetUser query, Post type] in that exact order.
Fields§
§definitions: Vec<MixedDefinition>All definitions in the document, in their original source order.
Trait Implementations§
Source§impl Clone for MixedDocument
impl Clone for MixedDocument
Source§fn clone(&self) -> MixedDocument
fn clone(&self) -> MixedDocument
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 moreSource§impl Debug for MixedDocument
impl Debug for MixedDocument
Source§impl PartialEq for MixedDocument
impl PartialEq for MixedDocument
impl StructuralPartialEq for MixedDocument
Auto Trait Implementations§
impl Freeze for MixedDocument
impl RefUnwindSafe for MixedDocument
impl Send for MixedDocument
impl Sync for MixedDocument
impl Unpin for MixedDocument
impl UnsafeUnpin for MixedDocument
impl UnwindSafe for MixedDocument
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