0

I have created a schema and tested the query (by making a GET request to the HTTP Endpoint as data source) in it which works fine. However, any mutation (containign POST/PUT/PATCH/DELETE requests) to HTTP endpoint does not send the value in request payload to the server.

This is the GraphQL mutation that I am running from AppSync Console -

mutation MyMutation {
createMain(input: {displayName: "test user", firstName: "test", id: 0, lastName: "user"}) {
displayName
firstName
id
lastName
}
}

Following is the response of the above mutation -

{
"data": {
"createMain": {
"displayName": null,
"firstName": null,
"id": 11,
"lastName": null
}
}
}

The point worth noting down here is that these values are getting saved in the DB that is how "id" is getting generated.

Any help is highly appreciated. Thanks!

0 Answers0