How to Clone a GraphCMS Project

Cloning a project is useful to create a backup, fork, or to rapidly scaffold client work for an agency work. Cloning will duplicate the project plan (in trial mode if a paid plan) and the project content but will not duplicate any custom roles or assigned roles.

Cloning in the UI

'Clone button'

  1. Navigate to the settings tab
  2. Inside of the General Project Settings card, on the bottom right, click clone

'UI cloning'

  1. After creating a name and description (optional), you will choose whether or not to also clone content, and which region you'd like your API served from.
  2. Clicking Create will then migrate the data you've just defined, and you're done! Project cloned!

Cloning via Mutation API

Cloning via the mutation API is also a possibility. You need to define the ID of the project you want to clone, the target region where the new project will be hosted and the name of the new/target project you want to create. You can optionally include a description and a boolean flag for whether or not to include the source content.

Cloning a project is only possible via the management API. For more information on how to work with the Management API, please read the Management API documentation.

mutation {
  cloneProject(
    data: {
      id: "9ea9dfaec82b4ab085788636b710195a"
      name: "Bergen"
      description: "The Mountains Project Clone"
      region: "US East"
      includeContent: true
    }
  ) {
    name
    id
  }
}