-
Notifications
You must be signed in to change notification settings - Fork 53
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
Problem with preloaded queries which use Enum and mutations #42
Comments
UPDATE:I console.logged the prepared data the server injected to the client, this is what I found:
I've noticed that the on the client I did this:
Obviously this is not a real solution, but I tried to see if that was the problem, and it was. The problem didn't occur when I tried to create the poll later. So I'm guessing the problem is with |
Just wanted to update that this is a completely relay issue, which I've addressed in this PR |
I have just updated isomorphic-relay to Relay v0.9.3 which contains a fix for this issue. |
I'm not sure whether this is a problem with isomorphic-relay, isomorphic-relay-router, or just my fault, but I have very weird problem, and it would probably be hard to explain.
I'll start with some information on my application:
I have 2 routes, say A and B, which queries a list of polls which can be sorted according to the input Enum: which accepts either TOP, TRENDING or NEW.
I also implemented a mutation which creates a poll, which can be accessed on a different route - C.
let's say I open my browser and open my app, it starts with route A, my index Route. The servers loads the polls fine, and the data is injected on the client. cool!
now I go to route C and try to create a poll, I click submit and I see this (console.log the transaction on the mutation's onFailure cb):
![capture](https://cloud.githubusercontent.com/assets/5209100/16542861/a57991f4-40c3-11e6-8220-c04711223085.PNG)
and on Network this:
I've looked on the query and this is what my application sent: (the relevant part is on fragment F1)
take note that F1 is a fragment which route A component's container requires. Somehow it passes as a string when I create a mutation.
2 things important to know:
to:
The problem disappears.
Any ideas? Is it something I'm doing wrong?
The text was updated successfully, but these errors were encountered: