https://github.com/atechguide/graphql-prisma-starter
GraphQL Prisma Starter Project
https://github.com/atechguide/graphql-prisma-starter
Last synced: about 1 year ago
JSON representation
GraphQL Prisma Starter Project
- Host: GitHub
- URL: https://github.com/atechguide/graphql-prisma-starter
- Owner: aTechGuide
- License: mit
- Created: 2019-10-24T10:56:04.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-05-30T03:59:18.000Z (about 5 years ago)
- Last Synced: 2024-12-31T04:41:56.860Z (over 1 year ago)
- Language: JavaScript
- Size: 1.44 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Graphql Prisma Starter
This starter contains the following functionality
- `User` schema
- Authentication
- Test Suite
# How to use the boiler Plate
- Edit the configuration files inside `config` folder, specifying the `service` and `stage` in `PRISMA_ENDPOINT`
- Launch Prisma and database
- `cd prisma`
- `docker-compose up -d`
- Deploy the prisma Datamodel. From inside `prisma` folder run
- Dev: `prisma deploy -e ../config/dev.env`
- Test: `prisma deploy -e ../config/test.env`
- Prod: `prisma deploy -e ../config/prod.env`
- Install the dependencies
- `npm install`
- Generate the dependencies
- Edit the `.graphqlconfig` file with correct `service` and `stage` as done in step 1
- Run `npm run get-schema`
- Run the App
- `npm run dev`
- `npm run test`
# Endpoint
- Localhost Playground => http://localhost:4000/
- Prisma Playground => http://localhost:4466/boilerplate/dev
- We need to generate a token for prisma playground via `prisma token`. Then supply the token in the query
```
{
"Authorization": "Bearer "
}
```
- Prisma Admin Panel => http://localhost:4466/boilerplate/dev/_admin
- We need to generate a token for prisma Admin Panel via `prisma token`. Then supply the token in the `Project Settings` in top right corner
# Reference
- This project was built as a part of [The Modern GraphQL Bootcamp (with Node.js and Apollo)](https://www.udemy.com/course/graphql-bootcamp/) Udemy course by Andrew Mead