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

(core) - Fix mutation operation's identity being used for filtering results #2225

Closed
mlecoq opened this issue Jan 31, 2022 · 4 comments · Fixed by #2228
Closed

(core) - Fix mutation operation's identity being used for filtering results #2225

mlecoq opened this issue Jan 31, 2022 · 4 comments · Fixed by #2228
Labels
bug 🐛 Oh no! A bug or unintented behaviour.

Comments

@mlecoq
Copy link
Contributor

mlecoq commented Jan 31, 2022

I'm trying to use urql to make a mutation but no result is returned

urql version : 2.1.1

Steps to reproduce

I have made a small example to reproduce the issue here : https://github.com/mlecoq/urql-issue

It is a simple login form that calls my login mutation to log in

Expected behavior

I expect to have a result after calling it

Actual behavior

I see with flipper that the network call is made but the promise never returns

@mlecoq mlecoq added the bug 🐛 Oh no! A bug or unintented behaviour. label Jan 31, 2022
@kaleabmelkie
Copy link

I got the same issue after upgrading @urql/core to 2.4.0 in a Svelte app too. The following promise does not resolve or reject, although the request was actually sent and was completed (I saw that in the dev tools Network tab).

const { data, error } = await client
    .mutation(LoginDocument, { input })
    .toPromise()

Also, I've noticed this happens only when used with either cacheExchange or authExchange for some reason. Removing both makes the promise resolve (I use basically every other officially supported exchange in my setup, but none of them cause this issue).

@JoviDeCroock
Copy link
Collaborator

Hey. we've identified the issue and will get a fix out asap

@kitten kitten changed the title [React Native] on mutation promise is not fullfilled (core) - Fix mutation operation's identity being used for filtering results Jan 31, 2022
@mlecoq
Copy link
Contributor Author

mlecoq commented Jan 31, 2022

Thanks a lot for your speed !

@kitten
Copy link
Member

kitten commented Jan 31, 2022

No worries 👍 This should be resolved in @urql/[email protected]. Sorry for the regression 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Oh no! A bug or unintented behaviour.
Projects
None yet
4 participants