GithubHelp home page GithubHelp logo

hhy5277 / graphcool-templates Goto Github PK

View Code? Open in Web Editor NEW

This project forked from prisma-archive/graphcool-templates

0.0 1.0 0.0 7.05 MB

๐Ÿ“— Collection of Graphcool Templates

License: MIT License

HTML 7.97% JavaScript 79.68% TypeScript 11.94% PHP 0.41%

graphcool-templates's Introduction

Graphcool Templates ๐Ÿ“—

Use Graphcool templates to quickly pull in predefined functionality into your own Graphcool service.

Overview

Officially supported templates

We maintain a number of officially supported templates:

Outdated templates

Notice that the outdated templates are not officially supported. Right now, most of the templates inside the outdated directory are not working when used with the graphcool-framework add-template command!

Contributions

Contributions are highly welcome ๐Ÿ’š if you'd like to add a new template, you can get inspiration from the help wanted label, or suggest your own template!

Adding templates to your service

There are two ways how you can use a template in your service:

  1. Manually download and copy the code from a template directory in this repository.
  2. Use the add-template command from the CLI.

Option 1: Manually adding templates

The process of adding a template to a Graphcool service involves several steps. You're basically merging your local service definition with the service definition of the template you want to use. In the end, you end up with only one graphcool.yml as well as only one types.graphql.

Adding a template manually:

  1. Download the folder that contains the service definition of the template you want to use.
  2. Copy that folder into the root directory of your Graphcool service.
  3. Copy over the contents from the template's graphcool.yml into the graphcool.yml of your own service. Be sure to adjust any file references, e.g. source files that contain code for functions, if necessary.
  4. Copy over the contents from the template's types.graphql into the types.graphql of your own service.
  5. Deploy your changes with graphcool deploy.

Option 2: Adding templates with the CLI

The add-template command in the Graphcool CLI basically automates the process of manually adding templates.

Official templates can be added by providing their relative path in this repository, e.g. for the email-password-template:

graphcool-framework add-template auth/email-password

To install your own templates, you can provide the path to a GitHub repository, too:

graphcool-framework add-template graphcool/templates/auth/email-password

When merging the template's graphcool.yml and types.graphql files with the ones from your local service definition, the CLI will only add the contents from the template files into your local files as comments. So you need to explicitly uncomment the parts form the template files that you actually want to use in your service.

The process for using the CLI to add a template thus looks as follows:

  1. Use the add-template <path> CLI command and specify the <path> which points to the template's directory in this repository.
  2. Uncomment the lines in graphcool.yml and types.graphql.
  3. Deploy your changes with graphcool deploy.

Contributors

A big thank you to all contributors and supporters of this repository ๐Ÿ’š

marktani yusinto kuldar heymartinadams pbassut kbrandwijk dkh215 sorenbs petrvlcek mwickett katopz randomer picosam antho1404 BoraKilicoglu peterpme Gregor1971 jhalborg felipesabino iamclaytonray fdidron

Help & Community Slack Status

Say hello in our Slack or visit the Graphcool Forum if you run into issues or have questions. We love talking to you!

graphcool-templates's People

Contributors

abeagley avatar antho1404 avatar aurnik avatar borakilicoglu avatar denkristoffer avatar fabien0102 avatar fdidron avatar felipesabino avatar heymartinadams avatar katopz avatar kbrandwijk avatar kuldar avatar marktani avatar millergregor avatar mrwillis avatar mwickett avatar nikolasburk avatar pbassut avatar peterpme avatar petrvlcek avatar picosam avatar ragzor avatar randomer avatar ronthedrummer avatar schickling avatar sorenbs avatar stevewpatterson avatar timsuchanek avatar wdoug avatar yusinto 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.