我的目标是为我的 apollo 节点服务器配置服务器端缓存。
我很难理解如何区分查询,具体取决于过滤器。
使用此查询:
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 的缓存数据。
提前致谢。