This example demonstrates how to programmatically build a project schema using the GraphCMS Management SDK.
It creates the following models and field types:
Blog Post
- Title
- Excerpt (with multi line form renderer)
- Content as Rich Text
- Author (Linked to Author)
Author
- Name
- Posts (one to many)
npx degit graphcms/graphcms-examples/using-management-sdk using-management-sdk
Add .env:
cp .env.sample .env
Provide values for GRAPHCMS_MIGRATION_TOKEN
and GRAPHCMS_ENDPOINT
.
Install & Run:
cd using-management-sdk
npm install
npm run start
# or
cd using-management-sdk
yarn
yarn start