I had used the 2 packages GraphQL and HotChocolate, which was the reason. It accepts one at a time, so we have to use only the HotChocolate for connecting the GraphQL server with ASP.NET.