yahoohung / loopback-graphql-server

Combine the powers of GraphQL with the backend of Loopback to automatically generate GraphQL endpoints based on Loopback Schema.
MIT License
84 stars 25 forks source link

A Reply based GraphQL Server for Loopback

Combine the powers of GraphQL with the backend of Loopback to automatically generate GraphQL endpoints based on Loopback Schema.

Installation

npm i loopback-graphql-server -S

Add the loopback-graphql-server component to the server/component-config.json:

"loopback-graphql-server": {
  "path": "/graphql",
  "graphiqlPath": "/graphiql",
  "modelMutationGroups": false,
  "modelQueryGroups": true
}

Requests will be posted to path path. (Default: /graphql);

Graphiql is available on graphiqlPath path. (Default: /graphiql);

Starter

(https://github.com/yahoohung/loopback-graphql-starter)

ACL and role mapping

Access token

Queries

Mutations

Subscriptions

Other Features

Loopback Types

Loopback Relations

Todo

Inspiration

This repository originally started as a fork of the loopback-graphql project by Tallyb and the loopback-graphql-relay by BlueEastCode. I have fixed many bugs and tested on enterprise environment. This version is ready for production use.