Workspace Configuration (wg.toml)
Priority of build scripts
WunderGraph Cloud will prioritise build scripts in the following order:
package.json build:wundergraph >
Optionally, WunderGraph Cloud uses a
wg.toml file to configure your cloud project. This file is located in the root of your repository. You can configure multiple projects in a single repository. This is useful, if you have a monorepo with multiple WunderGraph projects. If you have a single workspace, you can skip this section and we will auto-detect your repository. In the future, we might add more configuration options to this file.
Note: If you are not familiar with writing TOML files, you can visit https://toml.io/ to learn it.
version field is optional. If you don't specify it, the latest version will be used.
projects field is optional. It contains a list of projects. Each project has a name and a workspace path.
namefield is required. It contains the name of the project. The name is used to identify the project in the WunderGraph Cloud CI.
workspacefield is required. It contains the path to the workspace directory. The path is absolute to the root of the repository.
build_commandfield is optional. It will override the detected build command. For a monorepo, it will be executed at the root of the repository. In any other case, it will be executed wherever the WunderGraph directory is present. This will take precedence over the build command specified in your package.json file.
We have prepared a demo project to show you how to configure your project. You can find it here: cloud-multi-projects-demo