Apollo-module: TypeError Cannot read property 'freezeResults' of null

Created on 22 May 2019  路  2Comments  路  Source: nuxt-community/apollo-module

Version

v4.0.0-rc.5

Reproduction link

https://codesandbox.io/s/codesandboxnuxt-kdgpg?fontsize=14

Steps to reproduce

clean install - implement @nuxtjs/apollo as described
Screenshot 2019-05-22 at 12.00.37 PM.png

What is expected ?

apollo to be implemented

What is actually happening?

TypeError
Cannot read property 'freezeResults' of null

This bug report is available on Nuxt community (#c202)
bug-report

Most helpful comment

For now, I'm not pretty sure what happen. freezeResults in apollo-cache-inmemory supposed to be set by default.

The current solution, you can manual set freezeResults like this.

   apollo: {
    clientConfigs: {
      default: {
        httpEndpoint:
          "https://api.graph.cool/simple/v1/cj1dqiyvqqnmj0113yuqamkuu",
        inMemoryCacheOptions: {
          freezeResults: false
        }
      }
    }
  }

All 2 comments

For now, I'm not pretty sure what happen. freezeResults in apollo-cache-inmemory supposed to be set by default.

The current solution, you can manual set freezeResults like this.

   apollo: {
    clientConfigs: {
      default: {
        httpEndpoint:
          "https://api.graph.cool/simple/v1/cj1dqiyvqqnmj0113yuqamkuu",
        inMemoryCacheOptions: {
          freezeResults: false
        }
      }
    }
  }

Fixed on new release version.

Was this page helpful?
0 / 5 - 0 ratings