Error when using fetchoptions in apolloclient #514
Replies: 2 comments
-
I had same the error. |
Beta Was this translation helpful? Give feedback.
-
I solved it, it's belong to the stage of parse in the AST of GraphQL. I suggest should use the GraphiQL or GraphQL Playground to the queries or mutations etc before you run it in the code. Coz, the both of them can help you to detect the syntax. Good luck! |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am running into an error when using fetchoptions in the apolloclient:
Error sending the query 'QUERYNAME' ServerParseError: Unexpected end of JSON input at JSON.parse (<anonymous>)
When configuring the httplink like this :
const link = new HttpLink({ uri: 'http://localhost:4000', credentials: 'include', fetchOptions: { mode: 'no-cors' } });
Any advice ?
Beta Was this translation helpful? Give feedback.
All reactions