pub struct Planner<T>{ /* private fields */ }Expand description
A Deno worker backed query Planner.
Implementations§
Source§impl<T> Planner<T>
impl<T> Planner<T>
Sourcepub async fn new(
schema: String,
config: QueryPlannerConfig,
) -> Result<Self, Vec<PlannerError>>
pub async fn new( schema: String, config: QueryPlannerConfig, ) -> Result<Self, Vec<PlannerError>>
Instantiate a Planner from a schema string
Sourcepub async fn update(
&self,
schema: String,
config: QueryPlannerConfig,
) -> Result<Self, Vec<PlannerError>>
pub async fn update( &self, schema: String, config: QueryPlannerConfig, ) -> Result<Self, Vec<PlannerError>>
Update Planner from a schema string
Sourcepub async fn plan(
&self,
query: String,
operation_name: Option<String>,
options: PlanOptions,
) -> Result<PlanResult<T>, Error>
pub async fn plan( &self, query: String, operation_name: Option<String>, options: PlanOptions, ) -> Result<PlanResult<T>, Error>
Plan a query against an instantiated query planner
Sourcepub async fn api_schema(&self) -> Result<ApiSchema, Error>
pub async fn api_schema(&self) -> Result<ApiSchema, Error>
Generate the API schema from the current schema
Sourcepub async fn introspect(
&self,
query: String,
) -> Result<IntrospectionResponse, Error>
pub async fn introspect( &self, query: String, ) -> Result<IntrospectionResponse, Error>
Generate the introspection response for this query
Sourcepub async fn operation_signature(
&self,
query: String,
operation_name: Option<String>,
) -> Result<String, Error>
pub async fn operation_signature( &self, query: String, operation_name: Option<String>, ) -> Result<String, Error>
Get the operation signature for a query
Sourcepub async fn subgraphs(&self) -> Result<HashMap<String, String>, Error>
pub async fn subgraphs(&self) -> Result<HashMap<String, String>, Error>
Extract the subgraph schemas from the supergraph schema
Sourcepub async fn get_heap_statistics(&self) -> Result<HeapStatistics, Error>
pub async fn get_heap_statistics(&self) -> Result<HeapStatistics, Error>
Get deno’s heap statistics
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Planner<T>
impl<T> !RefUnwindSafe for Planner<T>
impl<T> Send for Planner<T>
impl<T> Sync for Planner<T>where
T: Sync,
impl<T> Unpin for Planner<T>where
T: Unpin,
impl<T> !UnwindSafe for Planner<T>
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