However, the query is able to select nullable fields to group by. This can result in unexpected errors. Is there a reason why keys needs to be non-null? If possible, could keys be made nullable?
This is better than a crash, but could keys be [null, "2", "6"] (based on the example data)? Although certainly not an exhaustive test, I did remove the new GraphQLNonNull portion and it worked as desired.
Reported via chat: