https://github.com/weakky/ecommerce-repro
https://github.com/weakky/ecommerce-repro
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/weakky/ecommerce-repro
- Owner: Weakky
- Created: 2018-10-10T16:22:07.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-10T16:24:29.000Z (over 7 years ago)
- Last Synced: 2025-02-03T17:07:06.555Z (over 1 year ago)
- Language: TypeScript
- Size: 74.2 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# typescript-graphql
This example demonstrates how to implement a **GraphQL server with TypeScript** based on Prisma & [graphql-yoga](https://github.com/prisma/graphql-yoga).
## Get started
### 1. Download example & Install dependencies
Clone the repository:
```
git clone git@github.com:prisma/prisma-examples.git
```
Install Node dependencies:
```
cd prisma-examples/typescript-graphql
yarn install # or `npm install`
```
### 2. Deploy the Prisma API
You will now deploy the Prisma API that's backing this example. This requires you to have [Docker](https://www.docker.com) installed on your machine (if you don't have Docker follow the collapsed instructions below the code block):
```
docker-compose up -d
cd prisma
# provided as a script in package.json
yarn prisma deploy
```
I don't have Docker installed on my machine
To deploy your service to a Demo server (rather than locally with Docker), follow these steps:
- Run the following command:
```
yarn prisma deploy --new
```
- In the interactive CLI wizard:
- Select the **Demo server**
- For all following questions, choose the suggested values by just hitting **Enter**
### 3. Start the server
```
yarn start
```
Navigate to [http://localhost:4000](http://localhost:4000) in your browser to explore the API of your GraphQL server in a [GraphQL Playground](https://github.com/prisma/graphql-playground).