设置Apollo服务器缓存提示时,如何尊重过滤器?

我的目标是使用server-side caching配置我的阿波罗节点服务器。

我很难理解如何根据过滤器来区分查询。

使用此查询:

type GroupAverageType @cacheControl(maxAge: 1000) {
    rounded: Float!
}
# How do I respect the groupId here - so I don't cache the same thing for different groups?
expensiveGroupAverageQuery(groupId: ID!): GroupAverageType!

如何缓存expensiveGroupAverageQuery,但确保,对groupA的查询不会返回groupB的缓存数据。

先谢谢了。

aaawang312 回答:设置Apollo服务器缓存提示时,如何尊重过滤器?

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2756317.html

大家都在问