This starter project is extended from React Full Stack Graphql
- GraphQL database: Includes GraphQL database binding to Prisma (running on MySQL)
- Tooling: Out-of-the-box support for GraphQL Playground & query performance tracing
You need to have the GraphQL CLI installed to bootstrap your GraphQL server using graphql create
.
You need to have docker installed to deploy the database and the prisma service to docker instances.
Requires Node version >8
npm i -g graphql-cli docker prisma
# 1. Navigate into the `server` directory of the new project
cd <project folder>/server
# 2. Deploy the MySQL database and prisma service to the docker instances
yarn setup
# 3. Start the server
yarn dev # runs server on http://localhost:4000, and opens GraphQL PLayground on http://localhost:5000
# 4. Open a new tab in the terminal and navigate back into my-app;
# then run the app
cd ..
yarn dev
yarn start
starts GraphQL server onhttp://localhost:4000
yarn dev
starts GraphQL server onhttp://localhost:4000
and opens GraphQL Playground onhttp://localhost:5000
File name | Description |
---|---|
├── .graphqlconfig.yml |
Configuration file based on graphql-config (e.g. used by GraphQL Playground). |
└── database (directory) |
Contains all files that are related to the Prisma database service |
├── prisma.yml |
The root configuration file for your Prisma database service (docs) |
└── datamodel.graphql |
Defines your data model (written in GraphQL SDL) |
└── src (directory) |
Contains the source files for your GraphQL server |
├── index.js |
The entry point for your GraphQL server |
├── schema.graphql |
The application schema defining the API exposed to client applications |
└── generated (directory) |
Contains generated files |
└── prisma.grapghql |
The Prisma database schema defining the Prisma GraphQL API |