I did some work using Canvas's graphql api, and figured out how to accomplish what you are after. I have posted my graph query below if you are interested, but what I found was that you not only had to set the "gradingType to "not_grated", but you also had to set the "submissionTypes" to "not_graded." It wasn't until I set the submissionTypes that it finally worked.
I don't know if this is the same case for the v1 api, but you might give it a go. If not, the query below should work if you are using the graph api.
mutation MyMutation {
__typename
updateAssignment(input: {id: "<assignment_id>", gradingType: not_graded, submissionTypes: not_graded}) {
assignment {
_id
name
}
}
}