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

prepareVariables + routing #235

Closed
devknoll opened this issue Sep 3, 2015 · 3 comments
Closed

prepareVariables + routing #235

devknoll opened this issue Sep 3, 2015 · 3 comments

Comments

@devknoll
Copy link
Contributor

devknoll commented Sep 3, 2015

If you pass in params from the route using e.g.

viewer: () => Relay.QL`query { viewer }`

then prepareVariables isn't called on the override parameters passed by the route (just initialVariables).

It seems like we should probably run the override parameters through too, so that everything going into the fragment query goes through prepareVariables first.

@devknoll devknoll changed the title prevVariables + prepareVariables + routing prepareVariables + routing Sep 3, 2015
@devknoll
Copy link
Contributor Author

devknoll commented Sep 4, 2015

Double checked the Relay source and debugged a little harder, and found out that prepareVariables is actually being called here, but some other strange thing is happening. I'll open a new issue when I discover it.

@devknoll devknoll closed this as completed Sep 4, 2015
@josephsavona
Copy link
Contributor

I'm working on a related change that should address this.
2015年9月3日(木) 14:10 Gerald Monaco notifications@github.com:

If you pass in params from the route using e.g.

viewer: () => Relay.QLquery { viewer }

then prepareVariables on the container is called, but prevVariables is an
empty object, rather than the params passed in from the route as would be
expected.

It seems like maybe we should also run any override parameters through
prepareVariables as well.


Reply to this email directly or view it on GitHub
#235.

@taion
Copy link
Contributor

taion commented Nov 11, 2015

I do notice an odd thing here where the variables passed in from a wrapper seem to clobber initialVariables.

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

No branches or pull requests

3 participants