简体   繁体   中英

“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:

在此处输入图片说明 Uncaught Error: Relay transform error ``Syntax Error RelayMutation (4:14) Expected Name, found EOF

I'm using phpstorm and it mark it too:

在此处输入图片说明

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM