{"_id":"@commercial-tribe/graphql-amqp-subscriptions","_rev":"10-f3bf422d1c8401d37e86cddee67eb1fa","name":"@commercial-tribe/graphql-amqp-subscriptions","dist-tags":{"latest":"1.0.7"},"versions":{"1.0.7":{"name":"@commercial-tribe/graphql-amqp-subscriptions","description":"GraphQL AMQP Subscriptions","version":"1.0.7","author":{"name":"https://github.com/CommercialTribe/graphql-amqp-subscriptions/graphs/contributors"},"license":"MIT","homepage":"https://github.com/CommercialTribe/graphql-amqp-subscriptions","bugs":{"url":"https://github.com/CommercialTribe/graphql-amqp-subscriptions/issues"},"repository":{"type":"git","url":"git+https://github.com/CommercialTribe/graphql-amqp-subscriptions.git"},"engines":{"node":">= 10"},"keywords":["graphql","subscription","api","push","pull","amqp","rabbitmq","rabbit"],"main":"lib/index.js","scripts":{"start":"nodemon --ext js,ts,tsx,json --exec babel-node -- src/index.ts --extensions \".ts,.tsx\" --source-maps inline","type-check":"tsc --noEmit","type-check:watch":"npm run type-check -- --watch","build":"npm run build:types && npm run build:js","build:types":"tsc --emitDeclarationOnly","build:js":"babel src --out-dir lib --extensions \".ts,.tsx\" --source-maps inline","vulnerabilities":"npm audit","check-updates":"npm outdated","lint":"tslint \"src/**/*.ts\"","test":"TS_NODE_FILES=true nyc mocha","release":"release-it"},"dependencies":{"@babel/runtime":"7.7.7","@types/debug":"4.1.5","debug":"4.1.1","graphql-subscriptions":"1.1.0"},"devDependencies":{"@babel/cli":"7.7.7","@babel/core":"7.7.7","@babel/node":"7.7.7","@babel/plugin-proposal-class-properties":"7.7.4","@babel/plugin-proposal-object-rest-spread":"7.7.7","@babel/plugin-transform-runtime":"7.7.6","@babel/preset-env":"7.7.7","@babel/preset-typescript":"7.7.7","@types/amqplib":"0.5.13","@types/chai":"4.2.7","@types/chai-as-promised":"7.1.2","@types/mocha":"5.2.7","@types/sinon":"7.5.1","@types/sinon-chai":"3.2.3","amqplib":"0.5.5","chai":"4.2.0","chai-as-promised":"7.1.1","eslint":"6.8.0","graphql":"14.5.8","mocha":"7.0.0","mocha-tslint":"0.3.0","nodemon":"2.0.2","nyc":"15.0.0","release-it":"12.4.3","sinon":"8.0.4","sinon-chai":"3.4.0","ts-node":"8.5.4","tslint":"5.20.1","typescript":"3.7.4"},"peerDependencies":{"amqplib":"^0.5.3","graphql":"^14.5.0"},"mocha":{"recursive":true,"spec":["src/**/*.test.ts","test/**/*.test.ts"]},"gitHead":"d248b13eb56927beb4a9f31c5e68b868ae096706","_id":"@commercial-tribe/graphql-amqp-subscriptions@1.0.7","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-EdT1S0oHvAECUz+/6EZxNj48JMwtk2qx1mL9QIPTr+nYJuwx2/IxK7NBEKoydTzN/ad7Rc2Yvmk5V/mtcrXGeQ==","shasum":"e70e77a1861831a68de45dc6e98c988d5e9fdf5f","tarball":"https://registry.npmjs.org/@commercial-tribe/graphql-amqp-subscriptions/-/graphql-amqp-subscriptions-1.0.7.tgz","fileCount":19,"unpackedSize":74223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2DGiCRA9TVsSAnZWagAApHwP/0B2gWUz/ubLM3QPenF4\nnbNqB+B3b0bis1OSLNJWQcz9K9XxV91DM/QRzolqW9zmfs+v88ax5TF0l/X7\nNSb1Av6qKcfLQiDD/2hBVymGreoiA3dRlIysYawW75EflLquRW0nYjyGAoSs\n3KGNutexe7ykjz02GPuETE5JtnkkfI66zxj5EU74QDQDTpLXa0WGOSoBsVMB\n+FUh/6mF8x+W0qm0gcrCLfzaUgXa1dfjzX8P5CAAC8hHSKoN3ZKZ684ptq80\ntGEljNSjfr05G5LeGiiiEsNlQgXMbhUfBVZW0TqmIP1YCEwgxBoYTgiBVBzb\nlg+Vy1qaCvEEEAldNOjLcgDXZRWtqll3Pqlm/Bly2aNvgIpJSXVNkDjNB1lz\n8QfLl7JkGuMhqYlESUWG/P353eSICMQcaFNwWe8xKcXoZr59/2SnCfxxV6ZR\nTKeQByO8AuMzuQFLPfCOY84UvOM9LIaaDhGTDyIs5mEw0/rjy539lDv3PMxL\na/e1+N6+8LtnVvTjL5nx9JiZLj+QOYG19PTfyU0z2h1lg7G9Bzg5cLRY4zs1\n0PsemKT8DMdQ8+ap5ekCC/lNeH3exgIxeWg3QIqhf6g9TeU1KJ7DHA9Gqqk2\nZtcWglooXrSCcc/v+HWkBFWg0mmINFPGHAFQbj2iCRgslIZ5dDuEOVtyBydj\nAulc\r\n=YONT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCb9JgU3U1YLPlCdcylcMJITMnCl/qmZqdQWYTlH456LwIhAKz0NNXH82uRuTFCA23elXkjW8UL5pKFr2NeHH9ctwQR"}]},"maintainers":[{"name":"bknutson","email":"bradley@bknutson.com"},{"name":"jyannessa","email":"jyannessa@commercialtribe.com"},{"name":"jrobbs","email":"jrobbs@commercialtribe.com"},{"name":"ct-deploy","email":"engineering@commercialtribe.com"},{"name":"jcabantomski","email":"jcabantomski@commercialtribe.com"},{"name":"cdriscol","email":"chris@driscolsoftware.com"},{"name":"raaabh76","email":"bob.hemphill@gmail.com"}],"_npmUser":{"name":"jcabantomski","email":"jcabantomski@commercialtribe.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-amqp-subscriptions_1.0.7_1588647201826_0.8628751307175477"},"_hasShrinkwrap":false}},"time":{"created":"2020-05-05T02:53:21.716Z","1.0.7":"2020-05-05T02:53:21.930Z","modified":"2023-06-12T15:50:34.711Z"},"maintainers":[{"email":"hari@thealpinecode.com","name":"hari.ac"},{"email":"swaroopa@thealpinecode.com","name":"swaroopaalpine"},{"email":"anand@thealpinecode.com","name":"anand_ac"},{"email":"engineering@commercialtribe.com","name":"ct-deploy"},{"email":"chris@driscolsoftware.com","name":"cdriscol"},{"email":"jrobbs@commercialtribe.com","name":"jrobbs"},{"email":"jyannessa@commercialtribe.com","name":"jyannessa"},{"email":"bradley@bknutson.com","name":"bknutson"},{"email":"chris.hague@chague.dev","name":"ctopherhague"}],"description":"GraphQL AMQP Subscriptions","homepage":"https://github.com/CommercialTribe/graphql-amqp-subscriptions","keywords":["graphql","subscription","api","push","pull","amqp","rabbitmq","rabbit"],"repository":{"type":"git","url":"git+https://github.com/CommercialTribe/graphql-amqp-subscriptions.git"},"author":{"name":"https://github.com/CommercialTribe/graphql-amqp-subscriptions/graphs/contributors"},"bugs":{"url":"https://github.com/CommercialTribe/graphql-amqp-subscriptions/issues"},"license":"MIT","readme":"# graphql-amqp-subscriptions\n\nThis package implements the PubSubEngine Interface from the [graphql-subscriptions](https://github.com/apollographql/graphql-subscriptions) package.\nIt allows you to connect your subscriptions manager to a AMQP PubSub mechanism.\n\nThis package is influenced by [graphql-redis-subscriptions](https://github.com/davidyaha/graphql-redis-subscriptions) and [graphql-rabbitmq-subscriptions](https://github.com/cdmbase/graphql-rabbitmq-subscriptions).\n\n[![npm Version](https://img.shields.io/npm/v/graphql-amqp-subscriptions.svg)](https://www.npmjs.com/package/graphql-amqp-subscriptions)\n[![npm Downloads](https://img.shields.io/npm/dm/graphql-amqp-subscriptions.svg)](https://www.npmjs.com/package/graphql-amqp-subscriptions)\n[![CircleCI](https://circleci.com/gh/Surnet/graphql-amqp-subscriptions.svg?style=svg)](https://circleci.com/gh/Surnet/graphql-amqp-subscriptions)\n[![Known Vulnerabilities](https://snyk.io/test/github/Surnet/graphql-amqp-subscriptions/badge.svg)](https://snyk.io/test/github/Surnet/graphql-amqp-subscriptions)\n\n# Basic usage\n\n```javascript\nimport { AMQPPubSub } from 'graphql-amqp-subscriptions';\nimport amqp from 'amqplib';\n\namqp.connect('amqp://guest:guest@localhost:5672?heartbeat=30')\n.then(conn => {\n  const pubsub = new AMQPPubSub({\n    connection: conn\n    /* exchange: 'graphql_subscriptions' */\n  });\n  // Use the pubsub instance from here on\n})\n.catch(err => {\n  console.error(err);\n});\n```\n\n# Benefits\n\n- Reusing existing [amqplib](https://github.com/squaremo/amqp.node) Connection\n- Reusing channels (one for subscriptions, one for publishing)\n- Performance/Ressource-usage benefits on AMQP (RabbitMQ) because of the aforementioned reasons [more info](https://www.cloudamqp.com/blog/2018-01-19-part4-rabbitmq-13-common-errors.html)\n- Using Topic Exchange (e.g. you publish to `agreements.eu.berlin.headstore` and subscribe to `agreements.eu.#`) [more info](https://www.cloudamqp.com/blog/2015-09-03-part4-rabbitmq-for-beginners-exchanges-routing-keys-bindings.html)\n\n# Debug\n\nThis package uses Debug.\nTo show the logs run your app with the environment variable DEBUG=\"AMQPPubSub\"\n","readmeFilename":"README.md"}