Combine the powers of GraphQL with the backend of Loopback to automatically generate GraphQL endpoints based on Loopback Schema.
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
);
(https://github.com/yahoohung/loopback-graphql-starter)
node
query to fetch single entity by IDwhere
with operators(https://loopback.io/doc/en/lb3/Where-filter.html) and order
filters on querieslimit
, offset
)first
, last
, before
, after
)post
, put
, patch
and delete
methods to mutationsThis 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.