Skip to content

App doesn't work with nullable reference types in C# 8.0, which affects HotChocolate schema type inference #4

@danvanderboom

Description

@danvanderboom

Thanks for building this sample app. It was really helpful in getting up and running with HotChocolate in our Azure Functions app.

The one thing I noticed was in pulling everything into a project with nullable reference types enabled, I got these errors:

HotChocolate.SchemaException: 'Multiple schema errors occured:
The return type of the interface field name does not match the field declared by object type Human. - Type: Human
The return type of the interface field name does not match the field declared by object type Droid. - Type: Droid

There are a few places here and there where I was able to update the schema types to define NonNullTypes (for string and float properties), and to make relationship properties explicitly nullable in the model classes, to get it to work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions