Table of contents
- Getting started
- What’s a Job/Batch/Pipeline
- Running the server
- Creating a worker
- The GNJ API
- Plugin the server to your express
- Q&A
- Contributing
A job scheduler, a runner and an interface to manage jobs. In one lib.
Why graphql-node-jobs?
Use GNJ is you want a project that:
- Is simple yet powerful: The models, the API, the code… are kept simple
- Job persistance: Everything is stored in a database
- No-SaaS: Want to keep your data in your servers? Perfect, GNJ is just Javascript running on your stack
- Simple: Just a few thousands lines of code (but tested ones 😄)
- Not a black box: Can be integrated easily in your Node.js codebase
- Use your ORM: GNJ uses Sequelize, so you stay in known territories
- Database Agnostic: Any database handled by Sequelize can be used
Other projects that might be interesting for you:
- https://github.com/graphile/worker
GNJ is kept small on purpose, the goal is to have the smallest API for the biggest impact.
What does it do?
It allows you to setup many execution pipelines and run them.
The default GraphQL-workbench interface.
How it works
NGJ (graphql-node-jobs) is available as:
- A standalone NodeJS application
- A GraphQL schema plugable to your Apollo server Schema
How can I integrate NGJ to my app?
Prerequisites
To use GNJ, you need a project with:
- Apollo Server V4
- Express
- Sequelize
- GraphQL-Sequelize-Generator
A few modules need to be installed, like Graphql-tag, react, WebSocket, etc.
Adding GraphQL-Node-Jobs to your project
yarn add graphql-node-jobs
To use the api, there is node-graphql-jobs-react that provide convenient Components to list/trigger/delete and other useful actions. It uses Websockets by default to provide a near-realtime experience.
Next: What’s a Job/Batch/Pipeline
Teamstarter’s other libraries
- GraphQL-Sequelize-Generator
- A Graphql API generator based on Sequelize.
- GraphQL-Web-Hooks
- A webhook implementation for GraphQL