pub async fn read_rel(
        &mut self,
        type_name: &str,
        rel_name: &str,
        shape: &str,
        partition_key: Option<&str>,
        input: Option<&Value>,
    ) -> Result<Value, Error> {
        trace!(
            "Client::read_rel called -- type_name: {} | rel_name: {} | shape: {} | partition_key: {:#?} | input: {:#?} ",
            type_name,
            rel_name,
            shape,
            partition_key,
            input,
        );

        let query = Client::<()>::fmt_read_rel_query(type_name, rel_name, shape);
        let result_field = type_name.to_string()
            + &*((&rel_name.to_string().to_title_case())
                .split_whitespace()
                .collect::<String>());
        self.graphql(&query, partition_key, input, Some(&result_field))
            .await
    }
/// Queries for one or more relationships
///
/// # Arguments
///
/// * type_name - the name of the [`Type`] for the source node in the relationship
/// * rel_name - the name of the [`Relationship`] to find
/// * shape - the GraphQL query shape, meaning the selection of objects and properties to be
/// returned in the query result
/// * partition_key - the partition_key is used to scope a query to a Cosmos DB partition. In
/// future, when Neo4J is supported, it is anticipated that the partition_key will be used to
/// select among Neo4J fabric shards.
/// * input - a [`serde_json::Value`], specifically a Value::Object, containing the arguments
/// to the graph query to select the relationship(s) to return
///
/// [`Relationship`]: ../engine/config/struct.Relationship.html
/// [`Type`]: ../engine/config/struct.Type.html
///
/// # Return
///
/// A [`serde_json::Value`] containing the query response
///
/// # Errors
///
/// Returns an [`Error`] of the following kinds:
///
/// * [`ClientRequestFailed`] - if the HTTP response is a non-OK
/// * [`PayloadNotFound`] - if the JSON response body is not a valid GraphQL
/// response
///
/// [`ClientRequestFailed`]: ../enum.Error.html#variant.ClientRequestFailed
/// [`PayloadNotFound`]: ../enum.Error.html#variant.PayloadNotFound
///
/// # Examples
///
/// ```rust,no_run
/// # use serde_json::json;
/// # use warpgrapher::Client;;
///
/// # #[tokio::main]
/// # async fn main() {
/// let mut client = Client::<()>::new_with_http("http:://localhost:5000/graphql", None).unwrap();
///
/// let proj_issues = client.read_rel("Project", "issues", "id props { since }",
///     Some("1234"), Some(&json!({"props": {"since": "2000"}}))).await;
/// # }
/// ```
Queries for one or more relationships
Queries for one or more relationships
pub async fn read_rel(
        &mut self,
        type_name: &str,
        rel_name: &str,
        shape: &str,
        partition_key: Option<&str>,
        input: Option<&Value>,
    ) -> Result<Value, Error> {
        trace!(
            "Client::read_rel called -- type_name: {} | rel_name: {} | shape: {} | partition_key: {:#?} | input: {:#?} ",
            type_name,
            rel_name,
            shape,
            partition_key,
            input,
        );
        let query = Client::<()>::fmt_read_rel_query(type_name, rel_name, shape);
        let result_field = type_name.to_string()
            + &*((&rel_name.to_string().to_title_case())
                .split_whitespace()
                .collect::<String>());
        self.graphql(&query, partition_key, input, Some(&result_field))
            .await
    }
pub async fn read_rel ( & mut self , type_name : & str , rel_name : & str , shape : & str , partition_key : Option < & str > , input : Option < & Value > , ) -> Result < Value , Error > { trace ! ( " " type_name rel_name shape partition_key input ) ; let query = Client :: < ( ) > :: fmt_read_rel_query ( type_name , rel_name , shape ) ; let result_field = type_name . to_string ( ) + & * ( ( & rel_name . to_string ( ) . to_title_case ( ) ) . split_whitespace ( ) . collect :: < String > ( ) ) ; self . graphql ( & query , partition_key , input , Some ( & result_field ) ) . await }
Queries for one or more relationships
Queries for one or more relationships
&mut self
type_name
&str
rel_name
&str
shape
&str
partition_key
Option<&str>
input
Option<&Value>
A [`serde_json::Value`] containing the query response
A [ ` serde_json :: Value ` ] containing the query response
&mut self
type_name
&str
rel_name
&str
shape
&str
partition_key
Option<&str>
input
Option<&Value>
errors
Returns an [`Error`] of the following kinds.

[`ClientRequestFailed`] - if the HTTP response is a non-OK
[`PayloadNotFound`] - if the JSON response body is not a valid GraphQL
response

[`ClientRequestFailed`]: ../enum.Error.html#variant.ClientRequestFailed
[`PayloadNotFound`]: ../enum.Error.html#variant.PayloadNotFound
Returns an [ ` Error ` ] of the following kinds . [ ` ClientRequestFailed ` ] - if the HTTP response is a non - OK [ ` PayloadNotFound ` ] - if the JSON response body is not a valid GraphQL response [ ` ClientRequestFailed ` ] : .. / enum . Error . html#variant . ClientRequestFailed [ ` PayloadNotFound ` ] : .. / enum . Error . html#variant . PayloadNotFound
examples
None
use serde_json::json;
None
use warpgrapher::client;;
None
#[tokio::main]
None
async fn main() {
let mut client = Client::<()>::new_with_http("http:://localhost:5000/graphql", None).unwrap().


let mut client = Client :: < () > :: new_with_http ( " http :: // localhost : 5000 / graphql " None ) . unwrap () .
}
None