hotchoc - There is no object type implementing interface `Node`


Bump into this weird hotchoc error while trying to run 'dotnet run -- schema export --output schema.graphql' to generate my schema. 


This is what my hotchoc types looks like. It turn out that I have a static method which prevented the auto code generations to work properly. 


using System.Collections.Generic;
using HotChocolate;
using HotChocolate.Types;
using HotChocolate.Types.Relay;

namespace Reviews.Types
{
    [QueryType]
    public class Query
    {      

        [NodeResolver]
        public static Review GetReview(
        [Service] ReviewRepository repository,
        int upc) =>
        repository.GetReview(upc);      
    }
}

To resolve this, simply remove the static method in my Query. 




 









Comments

Popular posts from this blog

The specified initialization vector (IV) does not match the block size for this algorithm