webiny / webiny-js

Open-source serverless enterprise CMS. Includes a headless CMS, page builder, form builder, and file manager. Easy to customize and expand. Deploys to AWS.
https://www.webiny.com
Other
7.32k stars 603 forks source link

fix(api-headless-cms): mock data generator #4147

Closed brunozoric closed 4 months ago

brunozoric commented 4 months ago

Changes

This PR adds a mock data generator. It is triggered via the GraphQL API call:

mutation StartMockDataGenerator {
    backgroundTasks {
        triggerTask(definition: mockDataManager, input: {
            modelId: "cars",
            amount: 10000
        }) {
            data {
                id
            }
            error {
                message
                code
                data
            }
        }
    }
}

How Has This Been Tested?

Jest and manually.