1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::collections::HashMap;

use crate::value::Value;

#[derive(Clone)]
pub struct GQLObject {
    pub attributes: HashMap<String, Value>,
}

pub fn flat_gql_groups(groups: &mut Vec<Vec<GQLObject>>) {
    let mut main_group: Vec<GQLObject> = Vec::new();
    for group in groups.iter_mut() {
        main_group.append(group);
    }

    groups.clear();
    groups.push(main_group);
}