{"_id":"@drdgvhbh/graphql-amqp-subscriptions","_rev":"1-030ec8e861dab9be9aea8dc471c7f498","name":"@drdgvhbh/graphql-amqp-subscriptions","dist-tags":{"latest":"1.0.7"},"versions":{"1.0.7":{"name":"@drdgvhbh/graphql-amqp-subscriptions","description":"GraphQL AMQP Subscriptions","version":"1.0.7","author":{"name":"https://github.com/Surnet/graphql-amqp-subscriptions/graphs/contributors"},"license":"MIT","homepage":"https://github.com/Surnet/graphql-amqp-subscriptions","bugs":{"url":"https://github.com/Surnet/graphql-amqp-subscriptions/issues"},"repository":{"type":"git","url":"git+https://github.com/Surnet/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","clean":"rimraf lib","build":"npm run clean && tsc","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","rimraf":"3.0.2","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":"c13aa24db28d0008129342ff17233f5286d98d32","_id":"@drdgvhbh/graphql-amqp-subscriptions@1.0.7","_nodeVersion":"13.5.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-WI4Lm1nRBsg51VzwS3VGhTi2sXVhPDj5u7zMvtBO84Q7YgI3Qva6S90byWDejx1VmlX+XtAjYhs/WjAX2eOYCw==","shasum":"6a56146e075f8d970ba89c21c008a733cf2c2d1c","tarball":"https://registry.npmjs.org/@drdgvhbh/graphql-amqp-subscriptions/-/graphql-amqp-subscriptions-1.0.7.tgz","fileCount":26,"unpackedSize":30626,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetCL0CRA9TVsSAnZWagAATmEQAIRCHGiLmwS4uuVczSDg\nz3tixf6IZvoon5sMXULl7WXcufErP+HLnLyWgxy3FX8hmPmQUkq7D3Urde1b\nJPO7YuWQhLyyeqUClo9FN5/ZgPaNPe1E81s2tBUwEnYIKNSkuiqcZ8tg+Yfo\nUFnD6CUhnqUCrnjvTdjRZk44peeTNfYfvbPsng84Amk3N+0RfX1teOueSPiH\nd7kx0dyUWBOBm7aq7AeaFqrr9EWZNDUTTWb1v/zJJ0mBRyA6402NihpS1reL\nVyNZ15WgpeaP2jjO667qACjzsbbZ5mDfuGJAV6kjiiRdS/WSO3uFVhqm5K3A\nw0QlxkKSZXsZJZHfrZbO8j2XkFouOpxyBRv04dzAiwO0KVDTUJ9fEjdCCana\nSpJ2/Du8gDh7OB6pJSK50suVx1KbV3HTA0Vm5tISlfeVD1WS3RnGBPOaNivF\nVaMXsHSLCutY1ZrGAEPLwr755dY/BpzCfBDKyTsPYuKvmJe8kajA+OoKvxpQ\nGRKl65bc3MZ1B9aRQGzOJJX5AZKKslsYf/C0v9FqbBRN2MlfHLotN6Atmlqi\nMymAjWqZGUigcZqgacfazoo8osSCqEewvmvNzCQ4OI0yHzuTMy5H385Nbjh8\nwG5uV3Lr/R9JYh7jPJdBTzS52y5XMapAVlcB1YF+ZKq2NyxB7PGSS+Wnv+1b\n7jd4\r\n=KSq2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCS685uSCryJAo0566v4n2V4a3R9NE32+i03R372eEW0AIhAJ4J8GUJcV798Zkh5wjmnwW1P5Av0tAxuO09ujR+Mx1R"}]},"maintainers":[{"name":"drdgvhbh","email":"drdgvhbh@gmail.com"}],"_npmUser":{"name":"drdgvhbh","email":"drdgvhbh@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-amqp-subscriptions_1.0.7_1588863732032_0.6033744993569061"},"_hasShrinkwrap":false}},"time":{"created":"2020-05-07T15:02:11.984Z","1.0.7":"2020-05-07T15:02:12.219Z","modified":"2022-04-05T05:37:12.739Z"},"maintainers":[{"name":"drdgvhbh","email":"drdgvhbh@gmail.com"}],"description":"GraphQL AMQP Subscriptions","homepage":"https://github.com/Surnet/graphql-amqp-subscriptions","keywords":["graphql","subscription","api","push","pull","amqp","rabbitmq","rabbit"],"repository":{"type":"git","url":"git+https://github.com/Surnet/graphql-amqp-subscriptions.git"},"author":{"name":"https://github.com/Surnet/graphql-amqp-subscriptions/graphs/contributors"},"bugs":{"url":"https://github.com/Surnet/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"}