pub struct GraphQLConverter { /* private fields */ }Expand description
GraphQL schema converter
Implementations§
Source§impl GraphQLConverter
impl GraphQLConverter
pub fn new() -> Self
Sourcepub fn parse_schema(&mut self, schema: &str) -> Result<SymbolTable>
pub fn parse_schema(&mut self, schema: &str) -> Result<SymbolTable>
Parse a GraphQL schema string (simplified implementation)
Note: This is a basic implementation that handles simple type definitions. For full GraphQL parsing, consider using a dedicated GraphQL parser crate.
Sourcepub fn to_symbol_table(&self) -> Result<SymbolTable>
pub fn to_symbol_table(&self) -> Result<SymbolTable>
Convert GraphQL types to a TensorLogic symbol table
Sourcepub fn directives_to_constraints(
&self,
type_name: &str,
field: &GraphQLField,
) -> Vec<TLExpr>
pub fn directives_to_constraints( &self, type_name: &str, field: &GraphQLField, ) -> Vec<TLExpr>
Convert field directives to TensorLogic constraint expressions
Sourcepub fn get_constraints(&self, type_name: &str) -> Vec<TLExpr>
pub fn get_constraints(&self, type_name: &str) -> Vec<TLExpr>
Get all constraints for a type
Sourcepub fn types(&self) -> &HashMap<String, GraphQLType>
pub fn types(&self) -> &HashMap<String, GraphQLType>
Get parsed types
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GraphQLConverter
impl RefUnwindSafe for GraphQLConverter
impl Send for GraphQLConverter
impl Sync for GraphQLConverter
impl Unpin for GraphQLConverter
impl UnwindSafe for GraphQLConverter
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> 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