I was looking at the GitHub GraphQL API (https://developer.github.com/v4/query) and noticed that they only expose a few root query types.
For example, to get a pull request you must use the `repository` Query type and access a pull request through the `Repository` object fields.
{
repository(name: 'test') {
pull_request(number: 2) {
title
}
}
}
You can't just access a pull request by ID via a root query type: {
pull_request(id: 12345) {
title
}
}
Is this a recommended practice? Is there an argument for limiting root query types in favor of using nested object types to keep the schema cleaner?