({
id,
title,
}: {
id: number | string
title: string
})
| 2661 | } |
| 2662 | |
| 2663 | async function updateAutoSavePostHelper({ |
| 2664 | id, |
| 2665 | title, |
| 2666 | }: { |
| 2667 | id: number | string |
| 2668 | title: string |
| 2669 | }): Promise<JsonObject> { |
| 2670 | const query = `mutation { |
| 2671 | updateAutosavePost(id: ${formatGraphQLID(id)}, data: {title: "${title}"}) { |
| 2672 | id |
| 2673 | title |
| 2674 | description |
| 2675 | createdAt |
| 2676 | updatedAt |
| 2677 | _status |
| 2678 | } |
| 2679 | }` |
| 2680 | |
| 2681 | const result: JsonObject = await restClient |
| 2682 | .GRAPHQL_POST({ |
| 2683 | body: JSON.stringify({ query }), |
| 2684 | }) |
| 2685 | .then((res) => res.json()) |
| 2686 | |
| 2687 | return result.data.updateAutosavePost |
| 2688 | } |
| 2689 | |
| 2690 | async function getVersionByIDHelper({ id }: { id: number | string }): Promise<JsonObject> { |
| 2691 | const query = `query { |
no test coverage detected
searching dependent graphs…