loopback-graphql-ext

0.0.1 • Public • Published

loopback-graphql-ext (WIP)

Executing queries on loopback models using GraphQL. This gives you intellisense while forming queries in GraphiQL. See Sample Project

Installation

npm install git://github.com/atul-github/loopback-graphql-ext.git

  • Call init() before application starts (AND after loopback boot is over)
var app = loopback();
.... some other code
var graphqlExt = require('loopback-graphql-ext');
graphqlExt.init(app); //app is loopback application
  • Start loopback application as you usually do
  • Access GraphQL end point on
http://localhost:3000/graphiql

What works so far

  • where filter
  • fields filter
  • Limit filter
  • Skip filter
  • Order filter

Refer to Examples. It is implemented in loopback sample project

Limitations

  • gt/gte/lt/lte/inq etc operators becomes 'keywords' and cannot be part of model property
  • Major problem I am facing is to implement flexibility when object can be a string or array. Eg include, order etc

Upcoming Features

  • Making it component so you don't have to initialize from code
  • Include filter
  • Mutation
  • Date type support
  • Authentication/Authorization using Access Token

Package Sidebar

Install

npm i loopback-graphql-ext

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

20.1 kB

Total Files

9

Last publish

Collaborators

  • atul-github