📌  相关文章
📜  Apollo 客户端禁用 inMemoryCache - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:24.893000             🧑  作者: Mango

代码示例1
const defaultOptions: {
      watchQuery: {
        fetchPolicy: 'no-cache',
        errorPolicy: 'ignore',
      },
      query: {
        fetchPolicy: 'no-cache',
        errorPolicy: 'all',
      },
    }

const client = new ApolloClient({
    link: concat(authMiddleware, httpLink),
    cache: new InMemoryCache(),
    defaultOptions: defaultOptions,

});