GraphQL made easy
Productive API for web, mobile and desktop developer


npm install -g subkit
getting started

Why SubKit GraphQL-Server?

Features

CLI

CLI toolbox to create and manage GraphQL-Server.

Production Ready

Prepared to deploy fast and easy.

Schema via GQL

Declarative GraphQL-Schema definition via GQL.

JavaScript ES6/7

Supports the best bits of ES6 and ES7.

Powerful directives

Build-in and programmable custom GraphQL directives.

EventSource Subscriptions

Provides EventSource/HTTP based GraphQL-Subscriptions.

Auto-Mocking

Automatically mocked data responses.

JSON Web Token

Authentication and Authorization via JWT.

CORS

Customizable production ready CORS.


What it Does?

About

Simplicity

by keeping things simple, SubKit GraphQL-Server is easier to use, easier to contribute to, and more secure.

Performance

SubKit GraphQL-Server is well-tested and production-ready - no modifications needed.

Experience

Front-end and API-Contract-Driven approach - designed and developed to make front-end and back-end development as efficient as possible.

Batteries included

All important GraphQL tools to create and manage GraphQL-APIs are build-in and available via CLI.


How to use?

 Examples

Basic GraphQL API

query allItems {
  items {
    id
    email
  }
}

Using GraphQL Directives API

query allItems {
  items @mock(value: [{id: "MikeBild", email: "mike.bild@gmail.com"}, {id: "SubKit"}]) {
    id @toLowerCase
    email
    profile @fetchJSON(url: "https://de.gravatar.com/${id}.json", jsonQuery: "entry[0]", timeout: 1000) {
      displayName
      description @toFormatString(template: "${displayName} (${aboutMe})", parent: true)
      thumbnailUrl
      aboutMe
      currentLocation
    }
  }
}

Todo-App GraphQL API with PouchDB

query loadAllTodos {
  todos {
    id
    rev
    text
    complete
  }
}