static parse(str, max) {

    let joins = {};
    let tree = this.formatTree(
      this.parseSyntaxTree(str),
      max,
      joins
    );

    if (!tree.length) {
      throw new Error('Invalid query: List an object to query');
    }

    return {
      structure: tree[0],
      joins: joins
    };

  }
Fully parse a GraphQL query, get necessary joins to make in SQL