Example repo showing how to use this package: https://github.com/xolvio/contentful-federation/
This creates a "Review" content type and a "Review" content entry.
npm run build && CONTENTFUL_SPACE=<CONTENTFUL_SPACE_ID> CONTENTFUL_ACCESS_TOKEN=<CONTENTFUL_CONTENT_MANAGEMENT_TOKEN> CONTENTFUL_ENVIRONMENT=<CONTENTFUL_ENVIRONMENT> npm run create-content
Alternatively you can also create the content manually through the Contentful UI.
npm install
npm run build
CONTENTFUL_SPACE=<SPACE> CONTENTFUL_ACCESS_TOKEN=<ACCESS_TOKEN> npm run start-subgraphs
npm run compose
npm run start-gateway
- In the Contentful UI, go to the page "Content model":
- Add content type
- Name: Review
- Create
- Add field 1. Type: Text 2. Name: upc 3. Create
- Add field 1. Type: Text 2. Name: body 3. Long text, full-text search 4. Create
- Save
- In the Contentful UI, go to the page "Content":
- Add entry: Review
- upc: 1
- Publish