-
Notifications
You must be signed in to change notification settings - Fork 536
Post request Mutation does not work in axios #230
Comments
@benjaminhon Did you figure out what was wrong? I'm getting this exact same error, and I've been stuck on it for the greater part of a day |
@jeanpaulversace yep, you have to put it in this format somehow
|
@benjaminhon Mine still does not work.. The funny thing is that it works from graphiql Here's code from the client-side request:
|
@jeanpaulversace if you are using axios, its the 'data' property and not the 'body' property here is how i do my axios request this is my helper function
one case how i use it
one my back end server
|
@benjaminhon @jeanpaulversace and just in case anybody else arrives at this thread with the same issue. I was sending the data through correctly on the data property, but I was getting 400 error as the obj I was sending wasn't complete / what the api was expecting ( it was a rather large obj and took a while to find the missing piece). |
@Paddy-Hamilton @jeanpaulversace You can always validate your query and variables inside GraphiQL: @benjaminhon Can I close this issue? |
Hi,
I have a post request mutation done using axios,
I am quite sure it is correct, as it works in graphiql.
My queries are alright, just the mutations do not work.
errors
Am i missing something? thanks
The text was updated successfully, but these errors were encountered: