This is expected behavior. You need to select ofType as well when it’s a NON_NULL type or LIST type. Check out more about introspection queries at graphql.org:
id looks a bit weird there, it has no name for the type. That’s because it’s a “wrapper” type of kind NON_NULL. If we queried for ofType on that field’s type, we would find the ID type there, telling us that this is a non-null ID.
Similarly, both friends and appearsIn have no name, since they are the LIST wrapper type. We can query for ofType on those types, which will tell us what these are lists of.
{
__type(name: "Droid") {
name
fields {
name
type {
name
kind
ofType {
name
kind
}
}
}
}
}
Indeed, helpful - Seems like I rushed before to fast through the introspection doc - because I missed that part completely. Thank you for pointing it out!