Function async_graphql_warp::graphql_batch_opts
source · 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?
More 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)))?,
))
})
}