1. Install the GraphQL and Prisma CLI

You'll need to have the graphql-cli and prisma dependencies installed globally to initialize the CommerceQL boilerplate.

$ npm install -g graphql-cli prisma

2. Initialize the CommerceQL boilerplate

The next step is to initialize a new GraphQL project using the CommerceQL boilerplate. my-commerce-app being the name of your app.

$ graphql create my-commerce-app --boilerplate commerceql/commerceql

3. Configure your ENV

CommerceQL by default uses Stripe as the core payment gateway. You'll need to modify the .env file and add your STRIPE_SECRET_KEY

4. Start the development server

You can start the GraphQL server and GraphQL Playground by using the dev script.

The GraphQL Playground will open in a new browser window so you can start writing your queries and mutations!

$ npm run dev