You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Last argument to field resolver is not checked when using the context class schema parser option #418
Same problem without contextClass. The DataFetchingEnvironment case isn't checked either when the parameter counts match. This builds without a warning:
The method has as many parameters as the field has arguments, so FieldResolverScanner#verifyMethodArguments accepts it and first gets mapped onto env. Every query of users then fails, with Parameter specified as non-null is null: ... parameter env when first is omitted, and Cannot construct instance of graphql.schema.DataFetchingEnvironment when it's sent.
Found by the every-field check in #879 (DeprecatedDirectiveTest's fixtures had this).
Since these schemas build today, I think the fix is a WARN at build that names the field and the parameter, then throwing in 15.0.0.
Activity
oryan-block commentedon Oct 18, 2026
Same problem without
contextClass. TheDataFetchingEnvironmentcase isn't checked either when the parameter counts match. This builds without a warning:The method has as many parameters as the field has arguments, so
FieldResolverScanner#verifyMethodArgumentsaccepts it andfirstgets mapped ontoenv. Every query ofusersthen fails, withParameter specified as non-null is null: ... parameter envwhenfirstis omitted, andCannot construct instance of graphql.schema.DataFetchingEnvironmentwhen it's sent.Found by the every-field check in #879 (
DeprecatedDirectiveTest's fixtures had this).Since these schemas build today, I think the fix is a WARN at build that names the field and the parameter, then throwing in 15.0.0.