internal protected GraphQlExpressionScalarResult( FieldContext fieldContext, IReadOnlyList <LambdaExpression> resolvers, IReadOnlyList <ExpressionVisitor> constructionVisitors, IReadOnlyCollection <IGraphQlJoin> joins) { this.FieldContext = fieldContext; this.resolvers = resolvers; this.constructionVisitors = constructionVisitors; this.Joins = joins; }
public static IGraphQlScalarResult <TReturnType> Construct <TReturnType>(TReturnType result, FieldContext fieldContext) { return(GraphQlExpressionScalarResult <TReturnType> .Constant(result, fieldContext)); }
public GraphQlResultJoinedFactory(FieldContext fieldContext, GraphQlJoin <TValue, TJoinedType> join) { this.fieldContext = fieldContext; this.join = join; }
internal static IGraphQlScalarResult <TReturnType> CreateJoin(FieldContext fieldContext, LambdaExpression newFunc, IGraphQlJoin join) { return(new GraphQlExpressionScalarResult <TReturnType>(fieldContext, new[] { newFunc }, EmptyArrayHelper.Empty <ExpressionVisitor>(), ImmutableHashSet.Create(join))); }
internal static IGraphQlScalarResult <TReturnType> Simple(FieldContext fieldContext, LambdaExpression newFunc) { return(new GraphQlExpressionScalarResult <TReturnType>(fieldContext, new[] { newFunc }, EmptyArrayHelper.Empty <ExpressionVisitor>(), ImmutableHashSet <IGraphQlJoin> .Empty)); }
internal static IGraphQlScalarResult <TReturnType> Constant(TReturnType result, FieldContext fieldContext) { return(new GraphQlExpressionScalarResult <TReturnType>(fieldContext, new[] { (Expression <Func <object?, TReturnType> >)(_ => result) }, EmptyArrayHelper.Empty <ExpressionVisitor>(), ImmutableHashSet <IGraphQlJoin> .Empty)); }
public GraphQlResultFactory(FieldContext fieldContext) : base(fieldContext, new[] { identity }, EmptyArrayHelper.Empty <ExpressionVisitor>(), EmptyArrayHelper.Empty <IGraphQlJoin>()) { }
public static IGraphQlResultFactory Construct(FieldContext fieldContext, Type modelType) { return((IGraphQlResultFactory)Activator.CreateInstance(typeof(GraphQlResultFactory <>).MakeGenericType(modelType), fieldContext) !); }