Skip to content

atul-github/loopback-graphql-ext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 loopback-graphql-ext

  • 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

About

loopback graphql extension

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published