Search code examples
javascripteofgraphqlrelayjsgraphql-js

"Expected Name, found EOF" mutation in Relay


Trying to use mutation in Relay, so I create a new "Relay.Mutation" subclass "RemoveMutation" export it and trying to use it in React component. But it always give me this massage:

enter image description here Uncaught Error: Relay transform error ``Syntax Error RelayMutation (4:14) Expected Name, found EOF

I'm using phpstorm and it mark it too:

enter image description here

Does any one have normal full example how to use Relay mutation? with creating subclass and mutation type?


Solution

  • Finally! The problem was in getFatQuery() first you have to add Payload to your mutation type and next in query you have to use only field you specified in outputFields