/graphcool

GraphQL Backend Development Framework

Primary LanguageTypeScript

CircleCI Slack Status npm version

WebsiteDocsForumChatTwitter

Note: This repository refers to a newer version of Graphcool (previously a BaaS). More information in the forum.

Graphcool is a GraphQL backend development framework

Quickstart

Watch this 2 min tutorial or follow the steps below to get started with the Graphcool framework:

  1. Install the CLI via NPM:
npm install -g graphcool@beta
  1. Init new project:
graphcool init
  1. Configure data model & project:

Edit types.graphql to define your data model and setup functions & permissions in graphcool.yml.

The graphcool.yml file is the core of your application and should look like this:

# Define your data model here
types: types.graphql

# Configure the permissions for your data model
permissions:
- operation: "*"

# tokens granting root level access to your API
rootTokens: []

# You can implement your business logic using functions
functions:
  hello:
    handler:
      code: src/hello.js
    type: resolver
    schema: src/hello.graphql
  1. Deploy your changes:

You can deploy your changes and migrate your database by running the following command:

graphcool deploy
  1. Connect to your GraphQL endpoint:

Use the endpoint from step (2) in your frontend (or backend) applications to connect to your GraphQL API.

Features

  • Flexible GraphQL API on top of your database
  • Powerful permission & authentication system
  • Event-driven

Examples

  • crud-api: Simple CRUD-style GraphQL API
  • auth: Email/password-based authentication & user permissions
  • send-email: Send email via Mailgun via GraphQL mutation
  • push-notification: Send push notification when new Post is created
  • env-variables: Function accessing environment variables
  • rest-wrapper: Extend GraphQL API by wrapping existing REST endpoint
  • full-example: Full example (webshop) demoing most available features

Architecture

Philosophy

  • Abstractions & Layers
  • Composability, Modularity & Building Blocks
  • Zero configuration/Sensible defaults/Batteries included but swappable
  • Transparency

FAQ

How does Graphcool compare to X?

Roadmap

Contributing

Your feedback is very helpful, please share your opinion and thoughts!

+1 an issue

If an existing feature request or bug report is very important for you, please go ahead and 👍 it or leave a comment. We're always open to reprioritize our roadmap to make sure you're having the best possible DX.

Requesting a new feature

We love your ideas for new features. If you're missing a certain feature, please feel free to request a new feature here. (Please make sure to check first if somebody else already requested it.)

Keep up to date

  • Subscribe to the features you're interested in
  • Check the changelog to see what we've recently built