@@ -75,24 +75,24 @@ private set
75
75
/// <summary>
76
76
/// Gets the pure field resolver. The pure field resolver is only available if this field
77
77
/// can be resolved without side effects. The execution engine will prefer this resolver
78
- /// variant if it is available and there are no executable directives that add a middleware
78
+ /// variant if it is available, and there are no executable directives that add middleware
79
79
/// to this field.
80
80
/// </summary>
81
81
public PureFieldDelegate ? PureResolver { get ; private set ; }
82
82
83
83
/// <summary>
84
84
/// Gets the subscription resolver.
85
85
/// </summary>
86
- public SubscribeResolverDelegate ? SubscribeResolver { get ; }
86
+ public SubscribeResolverDelegate ? SubscribeResolver { get ; private set ; }
87
87
88
88
/// <summary>
89
- /// Gets the result post processor.
89
+ /// Gets the result post- processor.
90
90
/// </summary>
91
91
public IResolverResultPostProcessor ? ResultPostProcessor { get ; private set ; }
92
92
93
93
/// <summary>
94
94
/// Gets the associated member of the runtime type for this field.
95
- /// This property can be <c>null</c> if this field is not associated to
95
+ /// This property can be <c>null</c> if this field is not associated with
96
96
/// a concrete member on the runtime type.
97
97
/// </summary>
98
98
public MemberInfo ? Member { get ; }
@@ -108,15 +108,18 @@ private set
108
108
/// Gets the associated resolver expression.
109
109
/// This expression can be <c>null</c>.
110
110
/// </summary>
111
- public Expression ? ResolverExpression { get ; }
111
+ public Expression ? ResolverExpression { get ; private set ; }
112
112
113
113
protected override void OnMakeExecutable (
114
114
ITypeCompletionContext context ,
115
115
ITypeSystemMember declaringMember ,
116
116
OutputFieldDefinitionBase definition )
117
117
{
118
+ var objectFieldDef = ( ObjectFieldDefinition ) definition ;
118
119
base . OnMakeExecutable ( context , declaringMember , definition ) ;
119
- CompleteResolver ( context , ( ObjectFieldDefinition ) definition ) ;
120
+ CompleteResolver ( context , objectFieldDef ) ;
121
+ ResolverExpression = objectFieldDef . Expression ;
122
+ SubscribeResolver = objectFieldDef . SubscribeResolver ;
120
123
}
121
124
122
125
private void CompleteResolver (
@@ -175,7 +178,7 @@ private void CompleteResolver(
175
178
skipMiddleware ) ;
176
179
}
177
180
178
- // by definition fields with pure resolvers are parallel executable.
181
+ // by definition, fields with pure resolvers are parallel executable.
179
182
if ( ! IsParallelExecutable && PureResolver is not null )
180
183
{
181
184
IsParallelExecutable = true ;
@@ -203,7 +206,7 @@ private void CompleteResolver(
203
206
204
207
ResultPostProcessor = definition . ResultPostProcessor ;
205
208
206
- // if the source generator has configured this field we will not try to infer a post processor with
209
+ // if the source generator has configured this field, we will not try to infer a post- processor with
207
210
// reflection.
208
211
if ( ( Flags & FieldFlags . SourceGenerator ) != FieldFlags . SourceGenerator
209
212
&& ResultPostProcessor is null
0 commit comments