-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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: RelayQueryField() in todo example #408
Comments
Thanks for the report, @reginedanica. What version of the code are you running? I can't repro this on the current Maybe you are running an old version of the babel-relay-plugin. Try running |
Also, at fe3e78f I'm unable to add a new todo, probably for the same reason? Full error message: |
i have also this same error on the current HEAD - I did run: npm install && npm run update-schema && npm run start The error is due to an invariant at: under debugger, it appears that GraphQLFieldNode {
kind: "Field",
__proto__: GraphQLFieldNode,
fieldName: "id"…} but
and so that fails the invariant in: getParentType(): string {
var parentType = this.__concreteNode__.metadata.parentType;
invariant(
parentType,
'RelayQueryField(): Expected field `%s` to be annotated with the ' +
'type of the parent field.',
this.getSchemaName()
);
return parentType;
} |
Yep! We broke this. @josephsavona is on it! |
Oops! Looking at it. |
Summary: addresses #408 Closes #414 Reviewed By: @steveluscher Differential Revision: D2503070
I can confirm that the TodoMVC app is working now. Thanks! |
@pcarion thanks for double-checking ;-) |
Thanks a lot guys! |
Summary: While investigating an issue reported for the todomvc example (#408), I found that `npm install` in an example directory was blowing up because I didn't have `babel` installed globally: ``` sh: babel: command not found ``` (Full output at https://gist.github.com/wincent/3221694ee3fdc46084f4) What's happening here: - Example's `preinstall` runs `install` from the top-level. - Top-level `install` installs its babel-relay-plugin dependency from NPM. - Example's `install` runs, and runs `build` from the babel-relay-plugin `file:../` dependency. - Note that `install` hasn't happened inside the `file:../` dependency yet, which means that the `babel` call will blow up if not globally installed. Fix: - Make sure the example's `preinstall` step `cd`'s into the `file:../` dependency and installs its dependencies (ie. `babel`) up front. Tested: Blow away global babel (`npm uninstall -g babel`), example `node_modules` and top-level `node_modules`, then `npm install` from inside an example or top-level; see it no longer blows up. Also `npm run update-schema` works, as does `npm run start`. Closes #409 Reviewed By: @josephsavona Differential Revision: D2536562 fb-gh-sync-id: fbd5e3c1a8b16747acc219e58fe896f39a32b394
I tried to remove items in the todo list and I got this error
'Uncaught Error: Invariant Violation: RelayQueryField(): Expected field
id
to be annotated with the type of the parent field.'The text was updated successfully, but these errors were encountered: