fn load_by_primary_key<'a>(
        select: &LookAheadSelection<'_, WundergraphScalarValue>,
        selection: Option<&'_ [Selection<'_, WundergraphScalarValue>]>,
        executor: &Executor<'_, Ctx, WundergraphScalarValue>,
        mut query: BoxedQuery<'a, Self, DB, Ctx>,
    ) -> Result<Option<juniper::Value<WundergraphScalarValue>>>
    where
        Self: 'static,
        &'static Self: Identifiable,
        Ctx: WundergraphContext + QueryModifier<Self, DB>,
        Ctx::Connection: Connection<Backend = DB>,
        <&'static Self as Identifiable>::Id: UnRef<'static>,
        <Self::Table as Table>::PrimaryKey:
            EqAll<<<&'static Self as Identifiable>::Id as UnRef<'static>>::UnRefed> + Default,
        <<Self::Table as Table>::PrimaryKey as EqAll<
            <<&'static Self as Identifiable>::Id as UnRef<'static>>::UnRefed,
        >>::Output: AppearsOnTable<Self::Table> + NonAggregate + QueryFragment<DB>,
        PrimaryKeyArgument<'static, Self::Table, (), <&'static Self as Identifiable>::Id>:
            FromLookAheadValue,
        DB: HasSqlType<
            SqlTypeOfPlaceholder<Self::FieldList, DB, Self::PrimaryKeyIndex, Self::Table, Ctx>,
        >,
        DB::QueryBuilder: Default,
        <Self::Table as QuerySource>::FromClause: QueryFragment<DB>,
    {
        use juniper::LookAheadMethods;
        let v = select
            .argument("primaryKey")
            .ok_or(WundergraphError::NoPrimaryKeyArgumentFound)?;
        let key = PrimaryKeyArgument::<
            Self::Table,
            _,
            <&'static Self as Identifiable>::Id,
            >::from_look_ahead(v.value())
            .ok_or(WundergraphError::NoPrimaryKeyArgumentFound)?;
        query = <_ as QueryDsl>::filter(
            query,
            <Self::Table as Table>::PrimaryKey::default().eq_all(key.values),
        );
        query = <_ as QueryDsl>::limit(query, 1);
        let res = Self::load(select, selection, executor, query)?;
        Ok(res.into_iter().next())
    }
/// Load a single entity by a given primary key
///
/// The default implementation calls `load` internally
Load a single entity by a given primary key
The default implementation calls `load` internally
Load a single entity by a given primary key The default implementation calls ` load ` internally
fn load_by_primary_key<'a>(
        select: &LookAheadSelection<'_, WundergraphScalarValue>,
        selection: Option<&'_ [Selection<'_, WundergraphScalarValue>]>,
        executor: &Executor<'_, Ctx, WundergraphScalarValue>,
        mut query: BoxedQuery<'a, Self, DB, Ctx>,
    ) -> Result<Option<juniper::Value<WundergraphScalarValue>>>
    where
        Self: 'static,
        &'static Self: Identifiable,
        Ctx: WundergraphContext + QueryModifier<Self, DB>,
        Ctx::Connection: Connection<Backend = DB>,
        <&'static Self as Identifiable>::Id: UnRef<'static>,
        <Self::Table as Table>::PrimaryKey:
            EqAll<<<&'static Self as Identifiable>::Id as UnRef<'static>>::UnRefed> + Default,
        <<Self::Table as Table>::PrimaryKey as EqAll<
            <<&'static Self as Identifiable>::Id as UnRef<'static>>::UnRefed,
        >>::Output: AppearsOnTable<Self::Table> + NonAggregate + QueryFragment<DB>,
        PrimaryKeyArgument<'static, Self::Table, (), <&'static Self as Identifiable>::Id>:
            FromLookAheadValue,
        DB: HasSqlType<
            SqlTypeOfPlaceholder<Self::FieldList, DB, Self::PrimaryKeyIndex, Self::Table, Ctx>,
        >,
        DB::QueryBuilder: Default,
        <Self::Table as QuerySource>::FromClause: QueryFragment<DB>,
    {
        use juniper::LookAheadMethods;
        let v = select
            .argument("primaryKey")
            .ok_or(WundergraphError::NoPrimaryKeyArgumentFound)?;
        let key = PrimaryKeyArgument::<
            Self::Table,
            _,
            <&'static Self as Identifiable>::Id,
            >::from_look_ahead(v.value())
            .ok_or(WundergraphError::NoPrimaryKeyArgumentFound)?;
        query = <_ as QueryDsl>::filter(
            query,
            <Self::Table as Table>::PrimaryKey::default().eq_all(key.values),
        );
        query = <_ as QueryDsl>::limit(query, 1);
        let res = Self::load(select, selection, executor, query)?;
        Ok(res.into_iter().next())
    }
fn load_by_primary_key < ' a > ( select : & LookAheadSelection < ' _ , WundergraphScalarValue > , selection : Option < & ' _ [ Selection < ' _ , WundergraphScalarValue > ] > , executor : & Executor < ' _ , Ctx , WundergraphScalarValue > , mut query : BoxedQuery < ' a , Self , DB , Ctx > , ) -> Result < Option < juniper :: Value < WundergraphScalarValue > > > where Self : ' static , & ' static Self : Identifiable , Ctx : WundergraphContext + QueryModifier < Self , DB > , Ctx :: Connection : Connection < Backend = DB > , < & ' static Self as Identifiable > :: Id : UnRef < ' static > , < Self :: Table as Table > :: PrimaryKey : EqAll < < < & ' static Self as Identifiable > :: Id as UnRef < ' static > > :: UnRefed > + Default , < < Self :: Table as Table > :: PrimaryKey as EqAll < < < & ' static Self as Identifiable > :: Id as UnRef < ' static > > :: UnRefed , > > :: Output : AppearsOnTable < Self :: Table > + NonAggregate + QueryFragment < DB > , PrimaryKeyArgument < ' static , Self :: Table , ( ) , < & ' static Self as Identifiable > :: Id > : FromLookAheadValue , DB : HasSqlType < SqlTypeOfPlaceholder < Self :: FieldList , DB , Self :: PrimaryKeyIndex , Self :: Table , Ctx > , > , DB :: QueryBuilder : Default , < Self :: Table as QuerySource > :: FromClause : QueryFragment < DB > , { use juniper :: LookAheadMethods ; let v = select . argument ( " " ) . ok_or ( WundergraphError :: NoPrimaryKeyArgumentFound ) ? ; let key = PrimaryKeyArgument :: < Self :: Table , _ , < & ' static Self as Identifiable > :: Id , > :: from_look_ahead ( v . value ( ) ) . ok_or ( WundergraphError :: NoPrimaryKeyArgumentFound ) ? ; query = < _ as QueryDsl > :: filter ( query , < Self :: Table as Table > :: PrimaryKey :: default ( ) . eq_all ( key . values ) , ) ; query = < _ as QueryDsl > :: limit ( query , 1 ) ; let res = Self :: load ( select , selection , executor , query ) ? ; Ok ( res . into_iter ( ) . next ( ) ) }
Load a single entity by a given primary key
The default implementation calls `load` internally
Load a single entity by a given primary key The default implementation calls ` load ` internally
select
&LookAheadSelection<'_, WundergraphScalarValue>
selection
Option<&'_ [Selection<'_, WundergraphScalarValue>]>
executor
&Executor<'_, Ctx, WundergraphScalarValue>
query
BoxedQuery<'a, Self, DB, Ctx>