如何限制 Apollo graphQL / Apollo Link Rest 中嵌套数组的项数?

问题描述 投票:0回答:0

我有这样的查询

`
query {
  doctors @rest(type: "doctors", path: "/doctors/") {
      Result {
          Id
          FirstName
          LastName
          Items (limit: 10) {
             id
             title
          }
      }
}
`

我只想从 Items 中获取 10 个项目,但我得到了完整列表!

这可行吗?

谢谢。

graphql apollo apollo-client apollo-server apollo-link-rest
© www.soinside.com 2019 - 2024. All rights reserved.