Relax Iron handler context trait requirements

This commit is contained in:
Magnus Hallin 2016-11-30 20:50:08 +01:00
parent f7123ed9db
commit e5167e1aae

View file

@ -24,7 +24,7 @@ use ::{InputValue, GraphQLType, RootNode, execute};
/// mapping.
pub struct GraphQLHandler<CtxFactory, Query, Mutation, CtxT>
where CtxFactory: Fn(&mut Request) -> CtxT + Send + Sync + 'static,
CtxT: Send + Sync + 'static,
CtxT: 'static,
Query: GraphQLType<CtxT> + Send + Sync + 'static,
Mutation: GraphQLType<CtxT> + Send + Sync + 'static,
{
@ -40,7 +40,7 @@ pub struct GraphiQLHandler {
impl<CtxFactory, Query, Mutation, CtxT>
GraphQLHandler<CtxFactory, Query, Mutation, CtxT>
where CtxFactory: Fn(&mut Request) -> CtxT + Send + Sync + 'static,
CtxT: Send + Sync + 'static,
CtxT: 'static,
Query: GraphQLType<CtxT> + Send + Sync + 'static,
Mutation: GraphQLType<CtxT> + Send + Sync + 'static,
{
@ -149,7 +149,7 @@ impl<CtxFactory, Query, Mutation, CtxT>
Handler
for GraphQLHandler<CtxFactory, Query, Mutation, CtxT>
where CtxFactory: Fn(&mut Request) -> CtxT + Send + Sync + 'static,
CtxT: Send + Sync + 'static,
CtxT: 'static,
Query: GraphQLType<CtxT> + Send + Sync + 'static,
Mutation: GraphQLType<CtxT> + Send + Sync + 'static,
{