[][src]Struct warpgrapher::engine::objects::Rel

pub struct Rel<GlobalCtx, RequestCtx> where
    GlobalCtx: GlobalContext,
    RequestCtx: RequestContext
{ /* fields omitted */ }

Represents a relationship in the graph data structure for auto-generated CRUD operations and custom resolvers.

Examples


fn custom_resolve(facade: ResolverFacade<(), ()>) -> ExecutionResult {
    // do work
    let node_id = Value::String("12345678-1234-1234-1234-1234567890ab".to_string());

    let mut hm1 = HashMap::new();
    hm1.insert("role".to_string(), Value::String("member".to_string()));

    // return rel
    facade.resolve_rel(&facade.create_rel(
        Value::String("655c4e13-5075-45ea-97de-b43f800e5854".to_string()),
        Some(hm1), node_id, "DstNodeLabel")?)
}

Trait Implementations

impl<GlobalCtx: Clone, RequestCtx: Clone> Clone for Rel<GlobalCtx, RequestCtx> where
    GlobalCtx: GlobalContext,
    RequestCtx: RequestContext
[src]

impl<GlobalCtx: Debug, RequestCtx: Debug> Debug for Rel<GlobalCtx, RequestCtx> where
    GlobalCtx: GlobalContext,
    RequestCtx: RequestContext
[src]

impl<GlobalCtx, RequestCtx> GraphQLType<DefaultScalarValue> for Rel<GlobalCtx, RequestCtx> where
    GlobalCtx: GlobalContext,
    RequestCtx: RequestContext
[src]

type Context = GraphQLContext<GlobalCtx, RequestCtx>

The expected context type for this GraphQL type Read more

type TypeInfo = Info

Type that may carry additional schema information Read more

Auto Trait Implementations

impl<GlobalCtx, RequestCtx> RefUnwindSafe for Rel<GlobalCtx, RequestCtx> where
    GlobalCtx: RefUnwindSafe,
    RequestCtx: RefUnwindSafe

impl<GlobalCtx, RequestCtx> Send for Rel<GlobalCtx, RequestCtx>

impl<GlobalCtx, RequestCtx> Sync for Rel<GlobalCtx, RequestCtx>

impl<GlobalCtx, RequestCtx> Unpin for Rel<GlobalCtx, RequestCtx> where
    GlobalCtx: Unpin,
    RequestCtx: Unpin

impl<GlobalCtx, RequestCtx> UnwindSafe for Rel<GlobalCtx, RequestCtx> where
    GlobalCtx: UnwindSafe,
    RequestCtx: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,