'Is there a way to query Graph QL to find all instances of a field name?

Given data with unknown structure, I would like to find all instances of 'label'.

{
    label: 'test',
    ...,
    child: {
       label: 'another test',
       ...,
       child: {
           label: 'more info',
           ...,
       },
       child: {
           no-label: 'I do not have a label field',
           ...,
       }
    },
}

I would like to return something like the above, just w/out the "other" fields because I would need to know "where" the labels are. The trick is that not all items or children will have a label and the specific structure is unknown at query time. (there may or may not be children on any item, etc.)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source