graphql/dataloader

nested queries and info

开放

#272 创建于 2021年5月30日

 (1 条评论) (2 个反应) (0 位负责人)JavaScript (556 个派生)batch import
help wanted

仓库指标

星标
 (12,520 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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!

贡献者指南