This example demonstrates how to programmatically build a project schema using the Hygraph 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 hygraph/hygraph-examples/using-management-sdk using-management-sdk
Add .env:
cp .env.sample .env
Provide values for HYGRAPH_MIGRATION_TOKEN
and HYGRAPH_ENDPOINT
.
Install & Run:
cd using-management-sdk
npm install
npm run start
# or
cd using-management-sdk
yarn
yarn start