migration
GraphCMS Migration SDK.
Usage
const { newMigration, FieldType } = require("@graphcms/migration")
const migration = newMigration({authToken, endpoint})
const author = migration.createModel({
apiId: "Author",
apiIdPlural: "Authors",
displayName: "Author"
})
author.addSimpleField({
apiId: "firstName",
displayName: "First Name",
type: FieldType.String
})
author.addSimpleField({
apiId: "lastName",
displayName: "Last Name",
type: FieldType.String
});
migration.run()
Docs
SDK docs is available at https://grapchms.com/docs/sdk.
The SDK is fully typed with Typescript and IDE intellisense is expected to work as desired.