您如何在Falcor中使整个范围无效? [英] How do you invalidate a whole range in Falcor?
问题描述
假设我有一个简单的类别和文章系统,并且有这样的路径可以获取特定类别中所有文章的列表.
Suppose I have a simple system of categories and articles, and there's a path like this to get a list of all the articles in a specific category.
categoriesById[{integers:ids}].articles[{ranges:rows}]
现在,该路线采用硬编码,以便按照最新的顺序对文章进行排序,因此,当我添加新文章时,我需要(假定)使类别中的所有文章失效,因为我希望将文章0
设为新文章.
Now, that route is hard-coded to sort the articles by newest first, so when I add a new article, I need to (I assume) invalidate all the articles within a category because I want article 0
to be the new article.
是否有一种简便的方法可以使类别中的整个文章范围无效,或者我是否需要使categoriesById
下的每个article
都显式无效,或者是否可以将项目拼接到列表中?在JSONGraph中?
Is there a short-hand way to invalidate the entire range of articles within a category, or do I need to invalidate every article
under categoriesById
explicitly, or, is there a way to splice an item into a list in the JSONGraph?