prisma-archive / babel-plugin-react-relay

Babel plugin for Relay Classic which works out of the box with your GraphQL endpoint
MIT License
53 stars 9 forks source link

POST body sent invalid JSON #13

Open 18601673727 opened 8 years ago

18601673727 commented 8 years ago

I'm trying to integrate create-react-app and swapi, here's my code and I'm facing this issue:

$ npm start

Failed to compile.

Error in ./src/index.js
Module build failed: Error: Bad Request: {"errors":[{"message":"POST body sent invalid JSON."}]}
    at Array.map (native)
 @ multi main

Please help, thanks!

schickling commented 8 years ago

I couldn't find any valid configuration in your shared code @18601673727. Have you tried out any of the available configuration options?

18601673727 commented 8 years ago

@schickling Thanks for the quick reply, well I added a .graphqlrc and got new error like below:

Failed to compile.

Error in ./src/index.js
Module build failed: Error: Bad Request: {"errors":[{"message":"Cannot query field \"locations\" on type \"__Directive\".","locations":[{"line":13,"column":9}]}]}
    at Array.map (native)
 @ multi main
schickling commented 8 years ago

@18601673727 I worry create-react-app is not yet compatible with Relay: https://github.com/facebookincubator/create-react-app/issues/462

randa12 commented 7 years ago

@help

{ "errors": [ { "message": "Cannot query field \"locations\" on type \"__Directive\".", "locations": [ { "line": 13, "column": 9 } ] } ] }