pub struct ReactiveGraphClient {
pub client: Client,
/* private fields */
}
Fields§
§client: Client
Implementations§
Source§impl ReactiveGraphClient
impl ReactiveGraphClient
pub fn new_default() -> Result<Arc<Self>, ReactiveGraphClientError>
pub fn new<A: Into<InstanceAddress>>( remote: A, ) -> Result<Arc<Self>, ReactiveGraphClientError>
Sourcepub fn url_reactive_graph(&self) -> String
pub fn url_reactive_graph(&self) -> String
Returns the URL of the graphql endpoint of the remote.
Sourcepub fn url_dynamic_graph(&self) -> String
pub fn url_dynamic_graph(&self) -> String
Returns the URL of the dynamic graph endpoint of the remote.
Sourcepub fn url_reactive_graph_runtime(&self) -> String
pub fn url_reactive_graph_runtime(&self) -> String
Returns the URL of the runtime endpoint of the remote.
Sourcepub fn url_reactive_graph_plugins(&self) -> String
pub fn url_reactive_graph_plugins(&self) -> String
Returns the URL of the plugins endpoint of the remote.
pub async fn introspection_query( &self, url: String, ) -> Result<Schema, ReactiveGraphClientExecutionError>
pub async fn introspection_query_reactive_graph( &self, ) -> Result<Schema, ReactiveGraphClientExecutionError>
pub async fn introspection_query_dynamic_graph( &self, ) -> Result<Schema, ReactiveGraphClientExecutionError>
pub async fn introspection_query_reactive_graph_runtime( &self, ) -> Result<Schema, ReactiveGraphClientExecutionError>
pub async fn introspection_query_reactive_graph_plugins( &self, ) -> Result<Schema, ReactiveGraphClientExecutionError>
pub fn types(self: &Arc<Self>) -> Types
pub fn instances(self: &Arc<Self>) -> Instances
pub fn json_schema(self: &Arc<Self>) -> JsonSchema
pub fn runtime(self: &Arc<Self>) -> Runtime
pub fn plugins(self: &Arc<Self>) -> Plugins
Sourcepub async fn execute_graphql<ResponseData, Vars, ResponseType>(
&self,
operation: Operation<ResponseData, Vars>,
extractor: impl FnOnce(ResponseData) -> ResponseType,
) -> Result<ResponseType, ReactiveGraphClientExecutionError>where
Vars: Serialize,
ResponseData: DeserializeOwned + 'static,
pub async fn execute_graphql<ResponseData, Vars, ResponseType>(
&self,
operation: Operation<ResponseData, Vars>,
extractor: impl FnOnce(ResponseData) -> ResponseType,
) -> Result<ResponseType, ReactiveGraphClientExecutionError>where
Vars: Serialize,
ResponseData: DeserializeOwned + 'static,
Runs a typed graphql query and extracts the response data.
Sourcepub async fn execute_dynamic_graph<ResponseData, Vars, ResponseType>(
&self,
operation: Operation<ResponseData, Vars>,
extractor: impl FnOnce(ResponseData) -> ResponseType,
) -> Result<ResponseType, ReactiveGraphClientExecutionError>where
Vars: Serialize,
ResponseData: DeserializeOwned + 'static,
pub async fn execute_dynamic_graph<ResponseData, Vars, ResponseType>(
&self,
operation: Operation<ResponseData, Vars>,
extractor: impl FnOnce(ResponseData) -> ResponseType,
) -> Result<ResponseType, ReactiveGraphClientExecutionError>where
Vars: Serialize,
ResponseData: DeserializeOwned + 'static,
Runs a typed graphql query and extracts the response data.
Sourcepub async fn execute_runtime<ResponseData, Vars, ResponseType>(
&self,
operation: Operation<ResponseData, Vars>,
extractor: impl FnOnce(ResponseData) -> ResponseType,
) -> Result<ResponseType, ReactiveGraphClientExecutionError>where
Vars: Serialize,
ResponseData: DeserializeOwned + 'static,
pub async fn execute_runtime<ResponseData, Vars, ResponseType>(
&self,
operation: Operation<ResponseData, Vars>,
extractor: impl FnOnce(ResponseData) -> ResponseType,
) -> Result<ResponseType, ReactiveGraphClientExecutionError>where
Vars: Serialize,
ResponseData: DeserializeOwned + 'static,
Runs a typed graphql query and extracts the response data.
Sourcepub async fn execute_plugins<ResponseData, Vars, ResponseType>(
&self,
operation: Operation<ResponseData, Vars>,
extractor: impl FnOnce(ResponseData) -> ResponseType,
) -> Result<ResponseType, ReactiveGraphClientExecutionError>where
Vars: Serialize,
ResponseData: DeserializeOwned + 'static,
pub async fn execute_plugins<ResponseData, Vars, ResponseType>(
&self,
operation: Operation<ResponseData, Vars>,
extractor: impl FnOnce(ResponseData) -> ResponseType,
) -> Result<ResponseType, ReactiveGraphClientExecutionError>where
Vars: Serialize,
ResponseData: DeserializeOwned + 'static,
Runs a typed graphql query and extracts the response data.
Sourcepub async fn execute<ResponseData, Vars, ResponseType>(
&self,
endpoint: String,
operation: Operation<ResponseData, Vars>,
extractor: impl FnOnce(ResponseData) -> ResponseType,
) -> Result<ResponseType, ReactiveGraphClientExecutionError>where
Vars: Serialize,
ResponseData: DeserializeOwned + 'static,
pub async fn execute<ResponseData, Vars, ResponseType>(
&self,
endpoint: String,
operation: Operation<ResponseData, Vars>,
extractor: impl FnOnce(ResponseData) -> ResponseType,
) -> Result<ResponseType, ReactiveGraphClientExecutionError>where
Vars: Serialize,
ResponseData: DeserializeOwned + 'static,
Runs a typed graphql query and extracts the response data.
Auto Trait Implementations§
impl Freeze for ReactiveGraphClient
impl !RefUnwindSafe for ReactiveGraphClient
impl Send for ReactiveGraphClient
impl Sync for ReactiveGraphClient
impl Unpin for ReactiveGraphClient
impl !UnwindSafe for ReactiveGraphClient
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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