MCPcopy Index your code
hub / github.com/payloadcms/payload / createAutoSavePostHelper

Function createAutoSavePostHelper

test/versions/int.spec.ts:2636–2661  ·  view source on GitHub ↗
({
      description,
      title,
    }: {
      description: string
      title: string
    })

Source from the content-addressed store, hash-verified

2634
2635 describe('Collections - GraphQL', () => {
2636 async function createAutoSavePostHelper({
2637 description,
2638 title,
2639 }: {
2640 description: string
2641 title: string
2642 }): Promise<JsonObject> {
2643 const query = `mutation {
2644 createAutosavePost(data: {title: "${title}", description: "${description}"}) {
2645 id
2646 title
2647 description
2648 createdAt
2649 updatedAt
2650 _status
2651 }
2652 }`
2653
2654 const result: JsonObject = await restClient
2655 .GRAPHQL_POST({
2656 body: JSON.stringify({ query }),
2657 })
2658 .then((res) => res.json())
2659
2660 return result.data.createAutosavePost
2661 }
2662
2663 async function updateAutoSavePostHelper({
2664 id,

Callers 1

int.spec.tsFile · 0.85

Calls 2

GRAPHQL_POSTMethod · 0.80
jsonMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…