Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] An error occurs when you do multiple queries and in subsequent queries use the value from the first query. #432

Closed
ErbolLab opened this issue Oct 24, 2018 · 9 comments
Labels

Comments

@ErbolLab
Copy link

ErbolLab commented Oct 24, 2018

I've noticed that this issue arise with "[email protected]"

Step to reproduce:

  1. Do a query with a variable
  2. Change the variable value to something
  3. Return the variable value to the initial value

You will see an error like:
"TypeError: Invalid property descriptor. Cannot both specify accessors and a value or writable attribute, #<Object>"

https://codesandbox.io/s/436n4pnow7

@NicoAiko
Copy link

Can confirm!
This also happens when trying to refetch stuff.

@Akryum
Copy link
Member

Akryum commented Oct 25, 2018

@ErbolLab
Copy link
Author

Guys from another issue found a quick workaround:

With NPM I got a downgrade to work after installing:
[email protected]
[email protected]
[email protected]
[email protected]

apollographql/apollo-client#4040 (comment)

@cschroeter
Copy link

If you use the vue apollo cli plugin - you just need to set the resolutions property for apollo-utilities. Thats it ;)

  "dependencies": {
    "apollo-client": "2.4.3",
    "graphql": "14.0.2",
    "vue": "2.5.17",
    "vue-apollo": "3.0.0-beta.25"
  },
  "resolutions": {
    "apollo-utilities": "1.0.21"
  },

@mariomka
Copy link

It was fixed in the last version. Just update apollo-client to 2.4.4.

@dimensi
Copy link

dimensi commented Nov 2, 2018

bug again appear in apollo-utilities 1.0.25, in 1.0.24 ok

@Akryum
Copy link
Member

Akryum commented Nov 2, 2018

@benjamn

@benjamn
Copy link

benjamn commented Nov 2, 2018

Just checked the reproduction above, and the bug is definitely not happening with the latest package versions, specifically

"dependencies": {
  "apollo-cache-inmemory": "1.3.8",
  "apollo-client": "2.4.5",
  "apollo-utilities": "1.0.25"
}

@dimensi Please check your dependencies, and/or provide a new reproduction. If the error is different, please open a new issue.

@dimensi
Copy link

dimensi commented Nov 6, 2018

If i install apollo-utilities directly bug disappear @benjamn.
@Akryum maybe better add apollo dependencies directly in package.json if we install "vue-apollo" via vue-cli ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants