Registry / devops / graphql-compose-bullmq

graphql-compose-bullmq

JSON →
library1.21.0jsnpmunverified

A GraphQL-Compose plugin (v1.21.0) that auto-generates GraphQL types for BullMQ queues and jobs. Uses graphql-compose's schema builder to create queries (queueKeys, queues, queue, job) and mutations (queueClean, jobAdd, jobRemove, etc.) from BullMQ queue configuration. Requires bullmq ^1.91.1 and graphql-compose ^7.15.0 || ^8.0.0 || ^9.0.0 as peer dependencies. Ships TypeScript types. Releases follow semantic versioning via semantic-release. Key differentiator: eliminates manual GraphQL schema writing for BullMQ; generates 40+ types for queue management.

npm install graphql-compose-bullmq
INSTALL
IMPORT
SIG · GRAPHQL-COMPOSE-BU
G
graphql-compose-bullmq
devopsjavascriptv1.21.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

composeBull
import { composeBull } from 'graphql-compose-bullmq'
const composeBull = require('graphql-compose-bullmq').composeBull
ESM default; for CJS use require with .default or .composeBull.
schemaComposer
import { schemaComposer } from 'graphql-compose'
import { schemaComposer } from 'graphql-compose-bullmq'
schemaComposer is exported by graphql-compose, not this package.
BullQueueType
import { BullQueueType } from 'graphql-compose-bullmq'
Exported type for use in custom resolvers; requires graphql-compose's TypeComposer.

Creates a GraphQL schema with BullMQ queries and mutations using composeBull.

import { composeBull } from 'graphql-compose-bullmq'; import { schemaComposer } from 'graphql-compose'; const { queryFields, mutationFields } = composeBull({ schemaComposer, typePrefix: 'MyApp', jobDataTC: `type MyJobData { url: String! createdAt: String }`, queue: { name: 'email', prefix: 'bull', }, redis: process.env.REDIS_URL ?? 'redis://localhost:6379', }); schemaComposer.Query.addFields(queryFields); schemaComposer.Mutation.addFields(mutationFields); const schema = schemaComposer.buildSchema(); console.log('GraphQL schema built with BullMQ integration.');
Debug
Known issues
breakingpeer dependency bullmq must be ^1.91.1; other versions may cause type/runtime errors.
fix
npm install bullmq@^1.91.1
affects: <1.91.1
breakinggraphql-compose version must be ^7.15.0 || ^8.0.0 || ^9.0.0; other versions may be incompatible.
fix
npm install graphql-compose@^7.15.0 || ^8.0.0 || ^9.0.0
affects: <7.15.0 >9.0.0
gotchaIf using CommonJS (require), import { composeBull } from 'graphql-compose-bullmq' will be undefined; use .default or destructure .composeBull.
fix
const { composeBull } = require('graphql-compose-bullmq');
affects: >=1.0.0
gotchajobDataTC must be a valid GraphQL type string or TypeComposer; passing an object will throw.
fix
Use a string SDL: `type JobData { ... }` or create via schemaComposer.createObjectTC().
affects: >=1.0.0
deprecatedcomposeBull does not support BullMQ v3+ queue options like defaultJobOptions; use queue options compatible with bullmq@^1.x.
fix
Stick to bullmq@^1.x or check compatibility with future releases.
affects: >=1.0.0
Errors
Common errors & fixes
TypeError: composeBull is not a function
Using default import with ESM or incorrect require pattern.
fix
Use named import: import { composeBull } from 'graphql-compose-bullmq'
Error: Cannot find module 'bullmq'
bullmq not installed or wrong version.
fix
npm install bullmq@^1.91.1
Error: schemaComposer must be provided
Missing schemaComposer in options object.
fix
Pass schemaComposer from graphql-compose: import { schemaComposer } from 'graphql-compose'
Upgrade
Version history
1.21.0latest on npm
Audit
Dependencies
bullmqrequiredPeer dependency; provides BullMQ queue and job operations.
graphql-composerequiredPeer dependency; provides schemaComposer and type composition utilities.
Agent activity
6 hits · last 30 days
node
6
Resources
graphql-compose-bullmq — npm install graphql-compose-bullmq · libregistry