news-catalyst / reproducible-tinynews-content-api

A webiny installation complete with scripted content models and graphql
0 stars 0 forks source link

reproducible tinynews content-api

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.

Where to find the custom setup

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.

Deploy

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:

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:

Debugging