- Notifications
You must be signed in to change notification settings - Fork1
dbritto-dev/prisma-apollo-starter
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
- Scalable GraphQL server: The server uses
apollo-server v2which is based on new Apollo Server - GraphQL database: Includes GraphQL database binding toPrisma (running on MySQL)
- Tooling: Out-of-the-box support forGraphQL Playground &query performance tracing
- Extensible: Simple and flexibledata model – easy to adjust and extend
- No configuration overhead: Preconfigured
graphql-configsetup
For a fully-fledgedGraphQL & Node.js tutorial, visitHow to GraphQL. You can more learn about the idea behind GraphQL boilerplateshere.
You need to have theGraphQL CLI installed to bootstrap your GraphQL server usinggraphql init,Prisma to deploy and update database useprisma deploy andYarn to install npm packages:
npm install -g graphql-cli prisma yarn
# 1. Clone the projectgit clone https://github.com/danilobrinu/prisma-apollo-starter.git# 2. Navigate to the new projectcd prisma-apollo-starter# 3. Install npm packagesyarn install# 4. Start server (runs on http://localhost:4000) and open GraphQL Playgroundyarn dev
Note: Create new enviroment using example.env and update
__PRISMA_ENDPOINT__if you don't have prisma endpoint runprisma deployand use Demo Server to get prisma endpoint
yarn startstarts GraphQL server onhttp://localhost:4000yarn debugstarts GraphQL server in debug mode onhttp://localhost:4000yarn playgroundopens the GraphQL Playground for theprojectsfrom.graphqlconfig.ymlyarn devstarts GraphQL server onhttp://localhost:4000and opens GraphQL Playgroundprisma <subcommand>gives access to local version of Prisma CLI (e.g.prisma deploy)
Note: We recommend that you're using
yarn devduring development as it will give you access to the GraphQL API or your server (defined by theapplication schema) as well as to the Prisma API directly (defined by thePrisma database schema). If you're starting the server withyarn start, you'll only be able to access the API of the application schema.
| File name | Description |
|---|---|
├── example.env | Use this file to configure your enviroment (copy/paste or rename to .env) |
├── .graphqlconfig.yml | Configuration file based ongraphql-config (e.g. used by GraphQL Playground). |
└── database/ | Contains all files that are related to the Prisma database service |
├── prisma.yml | The root configuration file for your Prisma database service (docs) |
└── enums.graphql | Defines your enums for data model (written inGraphQL SDL) |
└── seed.graphql | Defines your seed data model (written inGraphQL SDL) |
└── types.graphql | Defines your types for data model (written inGraphQL SDL) |
└── src/ | Contains the source files for your GraphQL server |
├── index.js | The entry point for your GraphQL server |
├── schema.graphql | Theapplication schema defining the API exposed to client applications |
├── resolvers/ | Contains the implementation of the resolvers for the application schema |
└── generated/ | Contains generated files |
└── prisma.grapghql | ThePrisma database schema defining the Prisma GraphQL API |
The GraphQL boilerplates are maintained by the GraphQL community, with official support from theApollo &Graphcool teams.
Your feedback isvery helpful, please share your opinion and thoughts! If you have any questions or want to contribute yourself, join the#graphql-boilerplate channel on ourSlack.
About
Prisma Starter Kit with the new Apollo Server (v2)
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Contributors2
Uh oh!
There was an error while loading.Please reload this page.


