-
Notifications
You must be signed in to change notification settings - Fork 68
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
Invariant Violation: RelayQueryNode: Invalid concrete node. #35
Comments
This isn't really an issue with this library, then, if you can't get it to work even without using its routing. What does your schema look like? |
What do you mean? It works fine if I render a
SimpleRelayTestRoute:
|
Are you setting |
Yes, I hardcoded the user ID in the
|
I'm afraid I can't help you further here without something like a working example that exhibits the problem. Nothing jumps out to me as being wrong. I'm using very similar patterns in my code and not seeing the problem. |
OK. Is there a working sample project I can clone that I can use to try to pinpoint the problem? If not I'll create a minimal project that exhibits this issue. |
I'm working on a TodoMVC example with routing. For now, there's @cpojer's starter kit fork: https://github.com/cpojer/relay-starter-kit/tree/nested-routes-example |
i checked out yours, and ran
That's with npm 3. |
Oops, messed up a few of the dependencies. Try now. |
OK. I also get a load of errors with cpojer's as well:
|
OK yours works now. I'll use it to try to get mine working. Thanks. |
OK so I finally found out what is causing this. I needed the following imports in my components:
|
Ah. Yeah. The Facebook examples are a little weird that way in how they pull those two in from browser globals. In general you do not want to follow that pattern. Glad you found the fix. |
I had the same problem. Even adding the explicit My {
"name": "relay-starter-kit",
"private": true,
"description": "A quick way to get up and running with Relay",
"repository": "facebook/relay-starter-kit",
"version": "0.1.0",
"scripts": {
"start": "babel-node ./server.js",
"update-schema": "babel-node ./scripts/updateSchema.js"
},
"dependencies": {
"babel": "5.8.21",
"babel-loader": "5.3.2",
"babel-relay-plugin": "0.2.3",
"classnames": "^2.1.3",
"express": "^4.13.1",
"express-graphql": "0.3.0",
"graphql": "^0.4.4",
"graphql-relay": "^0.3.2",
"react": "^0.14.0-rc1",
"react-dom": "^0.14.0-rc1",
"react-relay": "^0.3.2",
"react-router": "^1.0.0-rc1",
"react-router-relay": "^0.5.0",
"webpack": "^1.12.2",
"webpack-dev-server": "^1.11.0"
}
} |
I'm getting an error "Invariant Violation: RelayQueryNode: Invalid concrete node." and my route isn't rendering when I try to view the relay route below ("test/VXNlcjoxMDI1").
I've no idea what's going on.
The static route renders fine, so it's not an issue with my router setup. If I remove the userId parameter from the URI and hardcode the initial value of the userId I get the same error, so it's not an issue with extracting the userID from the URI. If I turn the App into a relay component and add a
queries
property I get the same bug, only this time the app doesn't render at all.So it seems there's a problem for some reason in my config with using relay routes.
Is this a bug or a problem with my setup? I've checked the docs again and again and I think I'm following them exactly.
Here's my code. app.js:
App.js:
SimpleRelayTest.js:
package.json:
The text was updated successfully, but these errors were encountered: