Contentful logo

Contentful Community

PlainClientAPI - problem with publishing after patching

There is a lack of examples of using PlainClientAPI at Contentful App development
nevertheless that example of first app building use it . In my case i met problem to use publish entry after it s patching

for (const item of Hero) {    
    props.cma.entry.patch({ entryId: }, [{ "op": "replace", "path": "/fields/type/ru", "value": "" }],{"X-Contentful-Version":item.sys.version})
    .then(props.cma.entry.publish({ entryId: })) 

Hero -is array of entries to be patched (fields value reseted) and republish then. Patching works ok: entry changed in right way. Problem with publishing .Please advise with right syntaxis.