Skip to content

Client 2.4.3 errors out when executing a query with a hot cache #4034

Closed
Akryum/vue-cli-plugin-apollo
#73
@GlennMatthys

Description

@GlennMatthys

When a query runs for a second time (for example navigating back to an already visited page) and there's data in the cache, QueryManager crashes.

The data is fetched through vue-apollo. It uses a watch query, the fetchPolicy is set to 'cache-and-network'.

Intended outcome:
Query runs and fills cache as usual

Actual outcome:
Execution errors out:

QueryManager.js?96af:414 Uncaught TypeError: Invalid property descriptor. Cannot both specify accessors and a value or writable attribute, #<Object>
    at Function.defineProperty (<anonymous>)
    at handleKey (cloneDeep.js?1e56:28)
    at Array.forEach (<anonymous>)
    at cloneDeepHelper (cloneDeep.js?1e56:30)
    at eval (cloneDeep.js?1e56:13)
    at Array.forEach (<anonymous>)
    at cloneDeepHelper (cloneDeep.js?1e56:12)
    at handleKey (cloneDeep.js?1e56:27)
    at Array.forEach (<anonymous>)
    at cloneDeepHelper (cloneDeep.js?1e56:30)

apollo-2 4 3-error

How to reproduce the issue:
Working on a jsfiddle

Versions
Fails with:

  System:
    OS: Windows 10
  Binaries:
    npm: 5.6.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 42.17134.1.0
  npmPackages:
    apollo-client: ^2.4.3 => 2.4.3
    vue-apollo: ^3.0.0-beta.11 => 3.0.0-beta.25
    vue-cli-plugin-apollo: ^0.17.2 => 0.17.2

Works with:

  System:
    OS: Windows 10
  Binaries:
    npm: 5.6.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 42.17134.1.0
  npmPackages:
    apollo-client: ^2.4.2 => 2.4.2
    vue-apollo: ^3.0.0-beta.11 => 3.0.0-beta.25
    vue-cli-plugin-apollo: ^0.17.2 => 0.17.2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions