pub struct GraphQLEngine { /* private fields */ }Expand description
GraphQL Engine
Main entry point for GraphQL query execution.
Implementations§
Source§impl GraphQLEngine
impl GraphQLEngine
Sourcepub fn new(config: GraphQLConfig, schema: GraphQLSchema) -> Self
pub fn new(config: GraphQLConfig, schema: GraphQLSchema) -> Self
Create a new GraphQL engine
Sourcepub async fn execute(&self, request: GraphQLRequest) -> GraphQLResponse
pub async fn execute(&self, request: GraphQLRequest) -> GraphQLResponse
Execute a GraphQL request
Sourcepub async fn execute_with_context(
&self,
request: GraphQLRequest,
context: ExecutionContext,
) -> GraphQLResponse
pub async fn execute_with_context( &self, request: GraphQLRequest, context: ExecutionContext, ) -> GraphQLResponse
Execute a GraphQL request with context
Sourcepub fn schema(&self) -> &GraphQLSchema
pub fn schema(&self) -> &GraphQLSchema
Get the schema
Sourcepub fn config(&self) -> &GraphQLConfig
pub fn config(&self) -> &GraphQLConfig
Get the configuration
Sourcepub fn metrics(&self) -> &GraphQLMetrics
pub fn metrics(&self) -> &GraphQLMetrics
Get metrics
Sourcepub fn generate_sdl(&self) -> String
pub fn generate_sdl(&self) -> String
Generate SDL (Schema Definition Language)
Trait Implementations§
Source§impl Clone for GraphQLEngine
impl Clone for GraphQLEngine
Auto Trait Implementations§
impl Freeze for GraphQLEngine
impl RefUnwindSafe for GraphQLEngine
impl Send for GraphQLEngine
impl Sync for GraphQLEngine
impl Unpin for GraphQLEngine
impl UnsafeUnpin for GraphQLEngine
impl UnwindSafe for GraphQLEngine
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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