question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cannot .Listen to mutations on a string

See original GitHub issue

(Reported by @aloani20 on gitter)

hi guys . I have this situation . on my client I was listening to property called “turn” using room.Listen ("turn", this.OnTurnChange); and the state on the server look like this

this.setState({
dice : 0 ,
turn : "none"
});

but when i mutate the value of dice i could see the change on the client but changing turn did not trigger this.OnTurnChange.

I have come up with a result that mutating javascript string variable on the server did not effect the room client listener.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
aloani20commented, Nov 3, 2017

lick = like. so happy it worked

0reactions
aloani20commented, Nov 3, 2017

thanks Endel woks lick a charm.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to make mutation of a string? JavaScript
You try to mutate a string which not possible, because strings are immutable. You need an assignment of the new value. Below a...
Read more >
Mutations and Input Types
Both mutations and queries can be handled by root resolvers, ... Input types can't have fields that are other objects, only basic scalar...
Read more >
How to cancel/abort a mutation query? #1551
Is there a way to cancel/abort mutation requests, similar to how cancelqueries does it for queries? I can't seem to figure that out....
Read more >
Mutation Testing with Stryker
My team had a problem, code that had 100% coverage still had bugs & it was due to vague unit tests assertions- enter...
Read more >
API Reference: ApolloServer
Providing a function is useful if you want to use a different root value depending on the operation's details, such as whether it's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found