This is a Webiny installation that has a custom API service setup. This custom service is where the default content models and graphql queries & mutations are configured.
Work on this is underway right now; more details tk.
You can find content model definitions in api/tinynews-models/src/plugins/models.
The GraphQL setup for queries, mutations and models is in api/tinynews-models/src/plugins/graphql.ts.
To create a new version of the API, for instance for a new tiny news company, pick a unique project name (ex: contentapi-tnc-1234) and do the following:
- edit the
projectNamein webiny.root.js - set env-specific names for
MONGODB_NAME(ex: contentapi-tnc-1234-prod) in .env.json - set env-specific names the
S3_BUCKETvalue in api/.env.json (you can use the same values as MONGODB_NAME here) - update the name in package.json (though I need to confirm whether this is necessary)
Then run the following commands, replacing prod with the desired environment (dev or local are other options):
$ yarn webiny deploy api --env=prod
$ yarn webiny deploy apps --env=prod
Save the API URL returned from the first command somewhere safe. We'll need that to configure the front-end app.
Open the URL returned from the second command, it will bring you the admin webiny cms. Click through to get that up and running. You'll have to do two things here:
- Set up a Personal Access Token; be sure to copy this value somewhere safe.
- Set up the site locales
- Cloudwatch logs for tinynews models part of the API: https://console.aws.amazon.com/cloudwatch/home?region=us-east-1#logsV2:log-groups/log-group/$252Faws$252Flambda$252F65c22661_contentapi-base_api_oaklyn_apiTinynewsModels