ChilliCream / ChilliCream/graphql-platform
Misleading error message on HotChocolate.SchemaException
@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
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.