I noticed that the GraphQL schema explorer does not list the available values on enums.
An introspection query like the following will give the information about the given enum:
{
__type(name: "SomeFancyEnum") {
enumValues {
name
description
isDeprecated
deprecationReason
}
}
}
For me, using HotChocolate for .Net Core, the above returns something like:
{
"data": {
"__type": {
"enumValues": [
{
"name": "REINDEER",
"description": "Sleigh propulsion system",
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "SANTA",
"description": "Flag a thing as being Santa",
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "SATAN",
"description": "Flag a thing as being Santa",
"isDeprecated": true,
"deprecationReason": "Ooops.. typo"
}
]
}
}
}
馃憢 Thanks for opening your first issue! If you're reporting a 馃悶 bug, please make sure
you include steps to reproduce it. If you're requesting a feature 馃巵, please provide real
use cases that would benefit. 馃應
To help make this a smooth process, please be sure you have first read the
contributing guidelines.
I was going to open an issue to ask for this feature!
In GraphQL there is a enum type which is a list of allowed values.
In many GraphiQL interfaces, the documentation shows all the allowed values that an enum can take. This is very useful for the users of the GraphQL API so they can see which values they can use when they are using the API
Ah yes, I just forgot to implement docs for enum types. Should be an easy addition! 馃憤
I've also noticed that enum types docs aren't shown too!
How's this?

Thank you for this @gschier. It is a very nice addition :)
Most helpful comment
How's this?