taped_resolver

Function taped_resolver 

Source
pub fn taped_resolver<F, Fut>(
    tape: Arc<dyn Tape>,
    mode: TapeMode,
    name: impl Into<String>,
    fetch: F,
) -> impl Fn(Value) + Send + Sync + 'static
where F: Fn(Value) -> Fut + Send + Sync + 'static, Fut: Future<Output = Result<Value, String>> + Send + 'static,
Expand description

Wrap a resolver’s fetch so its calls are recorded on, or answered from, tape.

name scopes the recording (use the field or slot name), so two resolvers given the same arguments do not answer for each other. The result has the shape Extract::field_resolve and Conversation::resolve_slot take.