Skip to content

Expected non-null value, resolve delegate return null #930

@mike-niemand

Description

@mike-niemand

Hi All,

This is no doubt related to: #807

When executing a query e.g. {menu: {menuId, nenuName}} the document executor throws:

Expected non-null value, resolve delegate return null for $GraphQL.Types.ComplexGraphType`1[DelFornoAPI.Models.Customer]

This type is unrelated to the query but does exist as a field in another type i.e.:

 public class CustomerOrderType : ObjectGraphType<VMCustomerOrder>
    {
        public CustomerOrderType()
        {
            Name = "CustomerOrderType";
            Field(x => x.CustomerOrderId);
            Field(x => x.FranchiseId);
            Field(x => x.Instruction, true, typeof(StringGraphType));
            Field(x => x.Customer, true, typeof(ComplexGraphType<Customer>));
        }
    }

It is however set to allow nullable.

Why is it attempting to validate this type as not null when it is unrelated to the query?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionDeveloper asks to help him deal with some problem

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions