public IGraphQlScalarResult <TDomainResult> Resolve <TDomainResult>(Expression <Func <TValue, TJoinedType, TDomainResult> > resolver)
        {
            var newFunc = Expression.Lambda <Func <TValue, TDomainResult> >(resolver.Body.Replace(resolver.Parameters[1], join.Placeholder), resolver.Parameters[0]);

            return(GraphQlExpressionScalarResult <TDomainResult> .CreateJoin(fieldContext, newFunc, join));
        }
Exemplo n.º 2
0
 public static IGraphQlScalarResult <TReturnType> Construct <TReturnType>(TReturnType result, FieldContext fieldContext)
 {
     return(GraphQlExpressionScalarResult <TReturnType> .Constant(result, fieldContext));
 }
Exemplo n.º 3
0
 IGraphQlScalarResult <TDomainResult> IGraphQlResultFactory <TValue> .Resolve <TDomainResult>(Expression <Func <TValue, TDomainResult> > resolver)
 {
     return(GraphQlExpressionScalarResult <TDomainResult> .Simple(FieldContext, resolver));
 }