batch requests 设置。但是,有些请求不应包含在批处理中:
我想到了两个非理想的解决方案:
onCompleted
有什么想法吗?
我不是这方面的专家,但似乎 batchKey 中的选项 apllo-link-batch-http 就是你要找的。例如,最简单的方法是在操作前加上关键字:
batchKey
const link = BatchHttpLink({ batchKey: operation => operation.name && operation.name.value.startsWith('eager_') ? 'eager' : 'normal' });