Closed ratson closed 5 years ago
Great ideas around docs, we could definitely use more of them. What error are you getting when using Mutation
?
For my own cases, I have been importing mutation with gql
from fusion-apollo. I will then typically compose my componennt with the graphql
function from react-apollo
, which populates the mutation as a property.
Thank you for the prompt reply.
I got POST body missing. Did you forget use body-parser middleware?
error when calling the mutation, the related code in https://github.com/ratson/fusion-apollo-material-ui-boilerplate/blob/master/src/pages/counter.js and https://github.com/ratson/fusion-apollo-material-ui-boilerplate/blob/master/src/main.js#L65
Thanks for the details, that's helpful. Most likely this is some issue with the local graphql server and https://github.com/fusionjs/fusion-plugin-apollo-server/issues/53. So far, I think folks have only been doing queries (GET), and not mutations (POST). We'll look into addressing that for you. We have a slowdown for the winter holidays, but will try to get to this when we can.
Let's close and track in https://github.com/fusionjs/fusion-plugin-apollo-server/issues/53 for now.
I am trying out fusion, but stuck in implementing
Mutation
(http://localhost:3000/counter), and cannot find any documentation about it, it would be helpful if there is an example on how to do it.