Struct apollo_compiler::schema::SchemaBuilder
source · pub struct SchemaBuilder { /* private fields */ }Implementations§
source§impl SchemaBuilder
impl SchemaBuilder
sourcepub fn new() -> Self
pub fn new() -> Self
Returns a new schema builder initialized with built-in directives, built-in scalars, and introspection types
sourcepub fn parse(
self,
source_text: impl Into<String>,
path: impl AsRef<Path>
) -> Self
pub fn parse( self, source_text: impl Into<String>, path: impl AsRef<Path> ) -> Self
Parse an input file with the default configuration as an additional input for this schema.
Create a Parser to use different parser configuration.
sourcepub fn build(self) -> Schema
pub fn build(self) -> Schema
Returns the schema built from all added documents, and orphan extensions:
Definition::SchemaExtensionvariants if noDefinition::SchemaDefinitionwas foundDefinition::*TypeExtensionif noDefinition::*TypeDefinitionwith the same name was found, or if it is a different kind of type
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for SchemaBuilder
impl Send for SchemaBuilder
impl Sync for SchemaBuilder
impl Unpin for SchemaBuilder
impl UnwindSafe for SchemaBuilder
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