I'm trying out the GraphQL mutations and would like to issue an update of an Entry, triggered from a webhook.
However, documentation on mutations seems sparse, and I find GraphQL highly confusing. Most examples talk about creating new entries, not update current ones, and how you actually call graphQL relies on implementation, it's hard to figure out how to deal with this in Craft.
I found https://github.com/craftcms/cms/issues/4835, which shows an example of creating an entry. Documentation talks about creating drafts, and publishing drafts, but no examples are shown, just a bunch of words thrown around.
First it says:
To save a draft for an entry, use the entry type-specific mutation which will have the name in the form of save___Draft
But then followed by:
To create a draft use the createDraft mutation., which requires the id of the entry for which to create the draft as an argument and returns the resulting id of the draft as the result.
For publishing a draft, you should use the publishDraft mutation, which requires the id of the draft to publish as an argument and returns the id of the entry it belongs to as the result.
None of these things makes sense to me...
Anyone have any comprehensible examples they can give?