Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Prisma Starter Kit with the new Apollo Server (v2)

NotificationsYou must be signed in to change notification settings

dbritto-dev/prisma-apollo-starter

Repository files navigation


🚀 Bootstrap your GraphQL server within seconds
Basic starter kit for a flexible GraphQL server for Node.js - based on best practices from the GraphQL community.

Features

For a fully-fledgedGraphQL & Node.js tutorial, visitHow to GraphQL. You can more learn about the idea behind GraphQL boilerplateshere.

Requirements

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

Getting started

# 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 deploy and use Demo Server to get prisma endpoint

Documentation

Commands

Note: We recommend that you're usingyarn dev during 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.

Project structure

File name               Description         

├── example.envUse this file to configure your enviroment (copy/paste or rename to .env)
├── .graphqlconfig.ymlConfiguration file based ongraphql-config (e.g. used by GraphQL Playground).
└── database/Contains all files that are related to the Prisma database service
  ├── prisma.ymlThe root configuration file for your Prisma database service (docs)
  └── enums.graphqlDefines your enums for data model (written inGraphQL SDL)
  └── seed.graphqlDefines your seed data model (written inGraphQL SDL)
  └── types.graphqlDefines your types for data model (written inGraphQL SDL)
└── src/Contains the source files for your GraphQL server
  ├── index.jsThe entry point for your GraphQL server
  ├── schema.graphqlTheapplication schema defining the API exposed to client applications
  ├── resolvers/Contains the implementation of the resolvers for the application schema
  └── generated/Contains generated files
    └── prisma.grapghqlThePrisma database schema defining the Prisma GraphQL API

Contributing

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.


[8]ページ先頭

©2009-2025 Movatter.jp