`RANGE_ADD` 增变器配置的 `rangeBehaviors` 属性中的 "GraphQL calls" 是什么?

What are the "GraphQL calls" in the `rangeBehaviors` attribute of the `RANGE_ADD` mutator config?

docs describe rangeBehaviors 为:

A map of GraphQL calls to the behavior we want Relay to exhibit when adding the new edge to connections under the influence of those calls. Behaviors can be one of 'append', 'prepend', or 'remove'.

文档中的示例是:

rangeBehaviors: {
  // When the ships connection is not under the influence
  // of any call, append the ship to the end of the connection
  '': 'append',
  // Prepend the ship, wherever the connection is sorted by age
  'orderby(newest)': 'prepend',
}

todos example repo 的另一个示例中,您有:

rangeBehaviors: {
  '': 'append',
  'status(any)': 'append',
  'status(active)': 'append',
  'status(completed)': null,
}

在这种情况下,"GraphQL call" 是什么? "under the influence of"这样的调用是什么意思?

当您在 Relay 中查询连接字段时,您可以指定超出标准分页参数 firstlastbefore 和 [=13= 的参数].

在上面的 TodoMVC 示例中,我们通过状态的当前过滤器限定查询。您显示的 TodoMVC 代码的含义是,突变应该为过滤 "active""any" (或默认状态)状态的查询附加新的待办事项,但不为过滤的查询附加新的待办事项仅 "completed" 的状态(这在上下文中有意义,因为突变添加了一个新的活动待办事项)。