pub fn graphql_batch_opts<E>(
    executor: E,
    opts: MultipartOptions
) -> impl Filter<Extract = ((E, BatchRequest),), Error = Rejection> + Clonewhere
    E: Executor,
Expand description

Similar to graphql_batch, but you can set the options with :async_graphql::MultipartOptions.

Examples found in repository?
src/batch_request.rs (line 19)
13
14
15
16
17
18
19
20
pub fn graphql_batch<E>(
    executor: E,
) -> impl Filter<Extract = ((E, BatchRequest),), Error = Rejection> + Clone
where
    E: Executor,
{
    graphql_batch_opts(executor, Default::default())
}
More examples
Hide additional examples
src/request.rs (line 63)
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
pub fn graphql_opts<E>(
    executor: E,
    opts: MultipartOptions,
) -> impl Filter<Extract = ((E, Request),), Error = Rejection> + Clone
where
    E: Executor,
{
    graphql_batch_opts(executor, opts).and_then(|(schema, batch): (_, BatchRequest)| async move {
        <Result<_, Rejection>>::Ok((
            schema,
            batch
                .into_single()
                .map_err(|e| warp::reject::custom(GraphQLBadRequest(e)))?,
        ))
    })
}