/**
  * Select only certain fields on queries instead of all fields.
  *
  * @param ResolveInfo $info
  * @return array
  */
 protected function getSelectFields(ResolveInfo $info)
 {
     $camel = config('relay.camel_case');
     $fields = array_get($info->getFieldSelection(2), 'edges.node');
     return collect($fields)->reject(function ($value) {
         is_array($value);
     })->keys()->transform(function ($value) use($camel) {
         return $camel ? snake_case($value) : $value;
     })->toArray();
 }
 /**
  * Select only certain fields on queries instead of all fields.
  *
  * @param ResolveInfo $info
  * @return array
  */
 protected function getSelectFields(ResolveInfo $info)
 {
     $camel = config('relay.camel_case');
     return collect($info->getFieldSelection(4)['edges']['node'])->reject(function ($value) {
         is_array($value);
     })->keys()->transform(function ($value) use($camel) {
         if ($camel) {
             return snake_case($value);
         }
         return $value;
     })->toArray();
 }