graphql-kit / graphql-voyager

🛰️ Represent any GraphQL API as an interactive graph
https://graphql-kit.com/graphql-voyager/
MIT License
7.79k stars 517 forks source link

Using custom schema throws Unexpected token u in JSON error #14

Closed Crevil closed 7 years ago

Crevil commented 7 years ago

When trying to run the demo at https://apis.guru/graphql-voyager/ with a custom schema from https://polar-reef-40902.herokuapp.com/graphiql I get the following error in the console.

Uncaught SyntaxError: Unexpected token u in JSON at position 0
    at JSON.parse (<anonymous>)
    at n.handleChange (https://apis.guru/graphql-voyager/main.js:24:12961)
    at Object.ReactErrorUtils.invokeGuardedCallback (https://cdn.jsdelivr.net/react/15.4.2/react-dom.js:9017:16)
    at executeDispatch (https://cdn.jsdelivr.net/react/15.4.2/react-dom.js:3006:21)
    at Object.executeDispatchesInOrder (https://cdn.jsdelivr.net/react/15.4.2/react-dom.js:3029:5)
    at executeDispatchesAndRelease (https://cdn.jsdelivr.net/react/15.4.2/react-dom.js:2431:22)
    at executeDispatchesAndReleaseTopLevel (https://cdn.jsdelivr.net/react/15.4.2/react-dom.js:2442:10)
    at Array.forEach (native)
    at forEachAccumulated (https://cdn.jsdelivr.net/react/15.4.2/react-dom.js:15423:9)
    at Object.processEventQueue (https://cdn.jsdelivr.net/react/15.4.2/react-dom.js:2645:7)

The UI tells me that the JSON is valid when pasting the result into Custom Introspection field.

Any ideas to get me going? Maybe a bug?

RomanHotsiy commented 7 years ago

@Crevil thanks for reporting. Should be fixed now