-
-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Unexpected token P in JSON at position 0 #241
Comments
The unformatted code is too hard to read; please format it properly in an edit and then I'll take a look: |
@shriram1056 I edited your code to be syntax highlighted. Please do that yourself next time, as asked. Also, please edit the markdown link URL for the Stack Overflow link as it's currently broken. Regarding the It after that it doesn't become obvious what the problem is, try to figure out if the problem is on the client or server by using the network inspector to see if the outgoing GraphQL request body is a correct GraphQL multipart request. If it is a client issue, the GitHub issues of this repo is not the right place to ask for help. If it is a server issue, please consult with the Apollo Server community for support. They have a lot of ongoing discussion about their broken support for file uploads in their repos, and Apollo has instructions in their docs for how to get it going. I'm leaving this issue closed for now, since no evidence of a |
The issue is related to the output of this error message, thrown by the Server. I guess your server config is wrong. |
I sorry to insert it here, since it was related to graphql-upload can you help me about this issue? |
this my apollo client code
on the node server, i have used upload:false as per apollo docs.
this is what my resolver looks like
i am getting the following error: Error: Unexpected token P in JSON at position 0.
P.S. before marking this as closed, please look at this stackoverflow post: https://stackoverflow.com/questions/64971480/cant-upload-files-with-apollo-client-graphql-in-next-js-app-post-body-missing. this post explain the problem better than i have done here
The text was updated successfully, but these errors were encountered: