ChilliCream / ChilliCream/graphql-platform

Misleading error message on HotChocolate.SchemaException

Open
#10,205 3 comments 0 reactions 1 assignee View on GitHub

@michaelstaib is already working on this.

Since Aug 24, 2026.

Dominant language
C#
Stars
5.8k
Forks
810
Avg merge
15h 39m
Merged PRs (30d)
98

Description

Product

Hot Chocolate

Version

16.6.0

Link to minimal reproduction

https://github.com/JoseAFerrer/MinimalReproducibleExample/blob/main/HotChocolate.SchemaException_01/MRE.cs

Steps to reproduce

Try to run a project with the attached mutation and the mutation type registered with the GraphQL server.

What is expected?

An error is thrown pointing out that all queries and mutations MUST return some kind of value, and therefore the mutation is invalid, since it returns only a Task.

What is actually happening?

The attached error is returned when hosting fails to start.

Relevant log output
HotChocolate.SchemaException: For more details look at the `Errors` property.

1. The object type `DictionaryEntry` has to at least define one field in order to be valid. (HotChocolate.Types.ObjectType<System.Collections.DictionaryEntry>)
2. There is no object type implementing interface `IDictionary`. (HotChocolate.Types.InterfaceType<System.Collections.IDictionary>)
Additional context

I have an inkling that if I understood more deeply how HotChocolate works behind the curtain, that error would make more sense to me.
But as it stands, and given that this is a common human error, I think, the current error message is incredibly misleading, because I thought the problem was that I was not registering Dictionary output correctly, and that's not the case.

Also, this error was not thrown in v14.2.0, which is interesting because I would have only seen it if I had called the mutation. But I didn't and after the upgrade to v16.6.0 the schema is more strict.
I'm not complaining that it is more strict now, but the error message is unacceptable as it provides no insight on what the dev did wrong or how to fix it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.