fn build_response(
        res: Vec<(
            Option<Self::Key>,
            <Self::FieldList as WundergraphFieldList<
                DB,
                Self::PrimaryKeyIndex,
                Self::Table,
                Ctx,
            >>::PlaceHolder,
        )>,
        global_args: &[juniper::LookAheadArgument<WundergraphScalarValue>],
        look_ahead: &juniper::LookAheadSelection<'_, WundergraphScalarValue>,
        selection: Option<&'_ [Selection<'_, WundergraphScalarValue>]>,
        executor: &Executor<'_, Ctx, WundergraphScalarValue>,
    ) -> Result<HashMap<Option<Self::Key>, Vec<juniper::Value<WundergraphScalarValue>>>> {
        let (keys, vals): (Vec<_>, Vec<_>) = res.into_iter().unzip();
        let vals = <<Self as LoadingHandler<DB, Ctx>>::FieldList as WundergraphFieldList<
            DB,
            <Self as LoadingHandler<DB, Ctx>>::PrimaryKeyIndex,
            <Self as HasTable>::Table,
            Ctx,
        >>::resolve(
            vals,
            global_args,
            look_ahead,
            selection,
            <Self as LoadingHandler<DB, Ctx>>::FIELD_NAMES,
            executor,
        )?;
        Ok(keys
            .into_iter()
            .zip(vals.into_iter())
            .fold(HashMap::new(), |mut m, (k, v)| {
                (*m.entry(k).or_insert_with(Vec::new)).push(v);
                m
            }))
    }
/// Common part of the implementation that could be implemented in a
/// generic way. Call this as soon as you have all required data
Common part of the implementation that could be implemented in a
generic way. Call this as soon as you have all required data
Common part of the implementation that could be implemented in a generic way . Call this as soon as you have all required data
fn build_response(
        res: Vec<(
            Option<Self::Key>,
            <Self::FieldList as WundergraphFieldList<
                DB,
                Self::PrimaryKeyIndex,
                Self::Table,
                Ctx,
            >>::PlaceHolder,
        )>,
        global_args: &[juniper::LookAheadArgument<WundergraphScalarValue>],
        look_ahead: &juniper::LookAheadSelection<'_, WundergraphScalarValue>,
        selection: Option<&'_ [Selection<'_, WundergraphScalarValue>]>,
        executor: &Executor<'_, Ctx, WundergraphScalarValue>,
    ) -> Result<HashMap<Option<Self::Key>, Vec<juniper::Value<WundergraphScalarValue>>>> {
        let (keys, vals): (Vec<_>, Vec<_>) = res.into_iter().unzip();
        let vals = <<Self as LoadingHandler<DB, Ctx>>::FieldList as WundergraphFieldList<
            DB,
            <Self as LoadingHandler<DB, Ctx>>::PrimaryKeyIndex,
            <Self as HasTable>::Table,
            Ctx,
        >>::resolve(
            vals,
            global_args,
            look_ahead,
            selection,
            <Self as LoadingHandler<DB, Ctx>>::FIELD_NAMES,
            executor,
        )?;
        Ok(keys
            .into_iter()
            .zip(vals.into_iter())
            .fold(HashMap::new(), |mut m, (k, v)| {
                (*m.entry(k).or_insert_with(Vec::new)).push(v);
                m
            }))
    }
fn build_response ( res : Vec < ( Option < Self :: Key > , < Self :: FieldList as WundergraphFieldList < DB , Self :: PrimaryKeyIndex , Self :: Table , Ctx , > > :: PlaceHolder , ) > , global_args : & [ juniper :: LookAheadArgument < WundergraphScalarValue > ] , look_ahead : & juniper :: LookAheadSelection < ' _ , WundergraphScalarValue > , selection : Option < & ' _ [ Selection < ' _ , WundergraphScalarValue > ] > , executor : & Executor < ' _ , Ctx , WundergraphScalarValue > , ) -> Result < HashMap < Option < Self :: Key > , Vec < juniper :: Value < WundergraphScalarValue > > > > { let ( keys , vals ) : ( Vec < _ > , Vec < _ > ) = res . into_iter ( ) . unzip ( ) ; let vals = < < Self as LoadingHandler < DB , Ctx > > :: FieldList as WundergraphFieldList < DB , < Self as LoadingHandler < DB , Ctx > > :: PrimaryKeyIndex , < Self as HasTable > :: Table , Ctx , > > :: resolve ( vals , global_args , look_ahead , selection , < Self as LoadingHandler < DB , Ctx > > :: FIELD_NAMES , executor , ) ? ; Ok ( keys . into_iter ( ) . zip ( vals . into_iter ( ) ) . fold ( HashMap :: new ( ) , | mut m , ( k , v ) | { ( * m . entry ( k ) . or_insert_with ( Vec :: new ) ) . push ( v ) ; m } ) ) }
Common part of the implementation that could be implemented in a
generic way.
Common part of the implementation that could be implemented in a generic way .
res
Vec<(
            Option<Self::Key>,
            <Self::FieldList as WundergraphFieldList<
                DB,
                Self::PrimaryKeyIndex,
                Self::Table,
                Ctx,
            >>::PlaceHolder,
        )>
global_args
&[juniper::LookAheadArgument<WundergraphScalarValue>]
look_ahead
&juniper::LookAheadSelection<'_, WundergraphScalarValue>
selection
Option<&'_ [Selection<'_, WundergraphScalarValue>]>
executor
&Executor<'_, Ctx, WundergraphScalarValue>