Giter Club home page Giter Club logo

graphql-template's Introduction

graphql-template

Prisma GraphQL-Yoga Backend Template

This is a template for a GraphQL backend, using Prisma and GraphQL-Yoga.

This setup is based on the original recording of Wes Bos' Advanced React and GraphQL course.

Setup

1. Install Node Modules

Run npm i --s

2. Initialize Prisma

Run prisma init

--From here you can set up prisma the way you see fit, however, I would recommend the dev server, and to not generate. Note, you will have to sign up for an account if you have not already. --

Run prisma deploy

3. Add Deploy Hooks For Prisma

Add the following to the bottom of your prisma.yml file

hooks: post-deploy: - graphql get-schema -p prisma

4. Environmental Variables

In the variables.env file, change the variables to create your own secret passwords.

Copy the endpoint variable from your prisma.yml file, and paste that into your PRISMA_ENDPOINT environmental variable.

Back in your prisma.yml file, change the endpoint variable to point towards your PRISMA_ENDPOINT environmental variable. endpoint: ${env:PRISMA_ENDPOINT}

5. Start Your Server

npm run dev

graphql-template's People

Contributors

pgarberg avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.