Product
Hot Chocolate
Version
16.0.9
Link to minimal reproduction
https://github.com/stanislav-a-frolov/TestResolverRequiredField
Steps to reproduce
Add Resolve field of ObjectType using ParentRequires to schema:
var executor = await new ServiceCollection()
.AddGraphQL()
.AddQueryType(q => q
.Field("foo")
.Resolve(ctx => new[] { new Foo { Bar = new() } }.AsQueryable())
.UseProjection()
)
.AddObjectType<Foo>(c =>
{
c.Field(f => f.Bar);
c.Field("quux")
.Resolve(c => c.Parent<Foo>().Bar)
.ParentRequires<Foo>(f => f.Bar!);
})
.AddProjections()
.BuildRequestExecutorAsync();
Query the field foo.quux.bar and get an NRE in reponse
What is expected?
Field is expected to be resolved without errors.
What is actually happening?
NRE is thrown in OperationCompiler.CompileSelectionSet
Relevant log output
Additional context
No response
Product
Hot Chocolate
Version
16.0.9
Link to minimal reproduction
https://github.com/stanislav-a-frolov/TestResolverRequiredField
Steps to reproduce
Add Resolve field of ObjectType using ParentRequires to schema:
Query the field foo.quux.bar and get an NRE in reponse
What is expected?
Field is expected to be resolved without errors.
What is actually happening?
NRE is thrown in OperationCompiler.CompileSelectionSet
Relevant log output
Additional context
No response