coolqlcool icon indicating copy to clipboard operation
coolqlcool copied to clipboard

[Feature request] Support nested site query

Open anhnhoktvn opened this issue 6 years ago • 1 comments

Thanks for the great library. It would be cooler if we can do nested query like below.

{
  hnews: site(url: "https://news.ycombinator.com") {
    numberOfTitles: count(elem: "tr.athing")
    titles: selectAll(elem: "tr.athing") {
      id: attr(name: "id")
      numberOfLinks: count(elem: ".storylink")
      link: select(elem: ".storylink") {
        text
        href
        site(urlFromAttr: "href") { <-- query site url from href value of the current elem
            info: selectAll(elem: ".info") {
                text
            }
        }
      }
    }
  }
}

anhnhoktvn avatar Jan 11 '19 09:01 anhnhoktvn

This would be truly awesome!

ucanlendit avatar Jan 16 '19 16:01 ucanlendit