graphql-engine/community/sample-apps/gatsby-contentful-auth0
Samir Talwar d9afcc1857 Upgrade all package-lock.json files to the v2 format.
NPM v7 uses a new (backwards-compatible) lockfile format. This upgrades all our various _package-lock.json_ files to use the new format.

It's much more verbose so that NPM can be a lot faster.

I figured it was cleaner to do this once in a separate PR rather than upgrading them in combination with adding or upgrading a new dependency.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5869
GitOrigin-RevId: 322fb63b96e2d873a4a3cc05fa6c7afa414716ce
2022-09-28 08:15:29 +00:00
..
app Upgrade all package-lock.json files to the v2 format. 2022-09-28 08:15:29 +00:00
auth0 community: add gatsby-contentful-auth0 sample app (#2603) 2019-07-26 09:12:00 +00:00
hasura community: fix sample apps metadata for v3 config 2021-08-19 03:46:59 +00:00
README.md community: fix sample apps metadata for v3 config 2021-08-19 03:46:59 +00:00

gatsby-contentful-auth0

This is the sample music playlist application demonstrating the Gatsby + Contentful Remote Join with Hasura GraphQL.

Getting started

If you've cloned this repository, navigate into the directory and install the npm modules using this command:

npm install

Note: if you clone this project through the Gatsby CLI, it will install the modules for you.

Auth0

This application uses Auth0 to manage identity. Refer to the Auth0 integration guide for the configuration.

Modify auth config

Rename .env.EXAMPLE to .env.development (or .env.production) and replace <value> for AUTH0_DOMAIN and AUTH0_CLIENTID with your Auth0 domain prefix and your client ID. These can be found on your client dashboard.

Replace the <value> for AUTH0_CALLBACK with the URL for your callback route. The default for development is http://localhost:8000/callback.

Contentful

Contentful remote schema is added as part of the migration. Configure the environment variables in Hasura GraphQL Engine server for the types to get merged.

Migrations

Execute the following command inside hasura to apply the migrations

hasura metadata apply
hasura migrate apply
hasura metadata reload

This will create all the necessary tables, relationships and remote joins.

Run the app

You can start the development server with the following command:

gatsby develop

The app runs at localhost:8000 by default.