graphql/dataloader

nested queries and info

オープン

#272 opened on 2021/05/30

 (1 件のコメント) (2 件のリアクション) (0 人の担当者)JavaScript (556 件のフォーク)batch import
help wanted

Repository metrics

Stars
 (12,520 個のスター)
PR merge metrics
 (PR metrics pending)

説明

I have a query that looks like this:

movies {
  name
  actors {
    firstname
    lastname
    movies {
      name
    }
  }
}

at the moment it is very easy for me to use the dataloader to query the actors of each movie but I have two problems:

  1. how do I use the dataloader to query the children of the children? In my case the movies of an actor
  2. how can I pass the parsed info data (so I know what fields are queried) to the dataloader, without reparsing the info, because as you know, the children-resolver is invoked for each parent

would be nice to see a simple example thanks in advanced!

コントリビューターガイド