{"_id":"@dwwoelfel/pg-pubsub","_rev":"3-e7fbdf9451f5259a4706e309549c8d15","name":"@dwwoelfel/pg-pubsub","dist-tags":{"latest":"4.4.5-alpha.0"},"versions":{"4.4.3-alpha.0":{"publishConfig":{"access":"public"},"name":"@dwwoelfel/pg-pubsub","version":"4.4.3-alpha.0","description":"Subscriptions plugin for PostGraphile using PostgreSQL's LISTEN/NOTIFY","main":"dist/index.js","scripts":{"db:init":"psql -X1v ON_ERROR_STOP=1 -v VERBOSITY=verbose -f __tests__/schema.sql \"$TEST_DATABASE_URL\"","test":"npm run db:init && jest -i","prepack":"tsc","tslint":"prettier --list-different 'src/**/*' && tslint --config ../../tslint.json --project tsconfig.json","watch":"tsc --watch"},"repository":{"type":"git","url":"git+ssh://git@github.com/graphile/graphile-engine.git"},"keywords":["pg","Postgres","plugin","PostgreSQL","Graphile","PostGraphile","subscriptions","realtime"],"author":{"name":"Benjie Gillam","email":"code@benjiegillam.com"},"license":"MIT","bugs":{"url":"https://github.com/graphile/graphile-engine/issues"},"homepage":"https://github.com/graphile/graphile-engine/tree/master/packages/pg-pubsub#readme","dependencies":{"@types/debug":"^4.1.2","@types/graphql":"^14.0.7","@types/pg":"^7.4.13","debug":"^4.1.1","graphql-subscriptions":"^1.0.0"},"peerDependencies":{"@dwwoelfel/graphile-build":"4.x","graphql":">=0.6 <15","postgraphile":"^4.4.0-alpha.0"},"devDependencies":{"@types/jest":"^24.0.5","graphql":">=0.6 <15","jest":"23.x","mock-req":"^0.2.0","mock-res":"^0.5.0","pg":">=6.5 <8","postgraphile":"^4.4.0-beta.0","ts-jest":"^23.10.5","typescript":"^3.3.1"},"gitHead":"70990b98c55d184ff96b6a5f05a94853298ca9a2","_resolved":"","_integrity":"","_from":"file:dwwoelfel-pg-pubsub-4.4.3-alpha.0.tgz","_id":"@dwwoelfel/pg-pubsub@4.4.3-alpha.0","_npmVersion":"6.4.1","_nodeVersion":"11.0.0","_npmUser":{"name":"dww","email":"dwwoelfel@gmail.com"},"dist":{"integrity":"sha512-NLn1e3fYxXQxVFgs2YO40YSTCjLdwl9dXEP4tkTH7jziBIMJGq2kRETVar0faTm/nDB5XPzXDy9ercizf9fYuQ==","shasum":"604a2217e9380acdc163b2beb45e8547f634a8c3","tarball":"https://registry.npmjs.org/@dwwoelfel/pg-pubsub/-/pg-pubsub-4.4.3-alpha.0.tgz","fileCount":12,"unpackedSize":33836,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgA97CRA9TVsSAnZWagAAeQgP/1cQopdSTaUKsA4v26TS\nY1q8wDBy1GX30iYiza/pxd9zEd7XaSX4JKk0Brgvfck4RqdNGHgoLJg9DVb4\nZhC/q7d4D0sVsEr8tlj6RCKO6T2a12lpZsjuLu9Wqn3mHLHXF5AcAau6GmdZ\n4VjF0gArXhsr6IoV7Nu1fXmdVAY9ixoBmgtSk/thi20BRex9DTZEGnPnUlyl\nEWRXkqoumdas4s1CI2QkiHv9Ky+aAN0VH5pOARawkCe6eobADQqTRmwQNhz2\nayAyvJy8bgZQ4jPcqN3kYR8YoqUI+wTQqZu0UFaIAOHCGb8tgx8vEivmf9tm\nOe2IHNjADNDkEEkxeMk+Kfen1N/rgdEw2NlN9VrFowDuU88B1T03S2Z0SPHE\n1LWQfwC/TXJdpmjto0tgsQ11yJKK4Sbn1oSQsKfo42miL4F5A5HPKtx5Sj5S\nj3YCZpZWB/4s6ARJtMmxJ9ErfwxYi3/GHrzxvBrQae/CuyhJ7Slw4mwbvZhH\nDlHA1ppJgJ+p0cfuBpMAWVUc3F2KcnremShsk3a0BMEUpTg/4sQ6nia0ajLG\ncx3OaXUdghCD70Dg/69OAEXrQT/on2qs2DElYxnoqkQbRu2TxgxtLE56QTEp\nRp/l8QOKP2m1M4VImP3YOByWYbUUj7LaS6OFBwb1H/algCjVUm6D1lqLCV8+\nQqt2\r\n=Z+zk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGsZVsbaEulldUxy1mXHxC/uz+STIszfkTbsYGyGA76hAiB9ZXg+aA+dXXP70hwtQUNejZtEIMp9h89dWGLrisM5sg=="}]},"maintainers":[{"name":"dww","email":"dwwoelfel@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pg-pubsub_4.4.3-alpha.0_1551896442666_0.5304797618164696"},"_hasShrinkwrap":false},"4.4.4-alpha.0":{"publishConfig":{"access":"public"},"name":"@dwwoelfel/pg-pubsub","version":"4.4.4-alpha.0","description":"Subscriptions plugin for PostGraphile using PostgreSQL's LISTEN/NOTIFY","main":"dist/index.js","scripts":{"db:init":"psql -X1v ON_ERROR_STOP=1 -v VERBOSITY=verbose -f __tests__/schema.sql \"$TEST_DATABASE_URL\"","test":"npm run db:init && jest -i","prepack":"tsc","tslint":"prettier --list-different 'src/**/*' && tslint --config ../../tslint.json --project tsconfig.json","watch":"tsc --watch"},"repository":{"type":"git","url":"git+ssh://git@github.com/graphile/graphile-engine.git"},"keywords":["pg","Postgres","plugin","PostgreSQL","Graphile","PostGraphile","subscriptions","realtime"],"author":{"name":"Benjie Gillam","email":"code@benjiegillam.com"},"license":"MIT","bugs":{"url":"https://github.com/graphile/graphile-engine/issues"},"homepage":"https://github.com/graphile/graphile-engine/tree/master/packages/pg-pubsub#readme","dependencies":{"@types/debug":"^4.1.2","@types/graphql":"^14.0.7","@types/pg":"^7.4.13","debug":"^4.1.1","graphql-subscriptions":"^1.0.0"},"peerDependencies":{"@dwwoelfel/graphile-build":"4.x","graphql":">=0.6 <15","postgraphile":"^4.4.0-alpha.0"},"devDependencies":{"@types/jest":"^24.0.5","graphql":">=0.6 <15","jest":"23.x","mock-req":"^0.2.0","mock-res":"^0.5.0","pg":">=6.5 <8","postgraphile":"^4.4.0-beta.0","ts-jest":"^23.10.5","typescript":"^3.3.1"},"gitHead":"a3818ddf26ef41d18331732d4da7faedc3cc4af8","_resolved":"","_integrity":"","_from":"file:dwwoelfel-pg-pubsub-4.4.4-alpha.0.tgz","_id":"@dwwoelfel/pg-pubsub@4.4.4-alpha.0","_npmVersion":"6.4.1","_nodeVersion":"11.0.0","_npmUser":{"name":"dww","email":"dwwoelfel@gmail.com"},"dist":{"integrity":"sha512-DuWXrJe+XrIfD1TELWS0/CpXeW0XRLL9dptRjfDKjjHxOm6CPLQFzkVzYDhgt1K8JVKqMzyt84G5s8Mbrc0uUw==","shasum":"a40d4fafe99d2289d64fee80af7fa8b62c8020d0","tarball":"https://registry.npmjs.org/@dwwoelfel/pg-pubsub/-/pg-pubsub-4.4.4-alpha.0.tgz","fileCount":12,"unpackedSize":33836,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgBRyCRA9TVsSAnZWagAASjsP/A7HCHifgDQ8tMhtWvI0\npxAhErJO8a8E65+QtlxufFgbAMVNFIdwFqvdNrmjztKL1vJlqLVDOraxgfWQ\n3kHa0uWv2fgYxSfSGnejNj0kJ/pYmiDcbeoWH8GI7BItx3VtKoDatX2y/j6r\nNpM9HPJMMsKaimPKZxejzNzHIfKzTT8l0mhiq8rMhXVquFXlnUhZuKED73Ne\nvcs07eaDgvTVwu6XrPkpvgseta2VSDwfW9uO88zhPn7zs/57Qg4u0KcMdAfL\nBZ9mjfn8qDLipfmtdf6BlcsBxstpZGCKYlz27CpSW4yjKi1ctW2KzxYTqsm4\nbwJEDUfZfKOmmLKVtSmELXXL+CTc+oWJR/sfDIT0vLd3HQDzJkKMkbAUB/dm\n4fp7cqjR+Li08TJLN9T9iR4e3BvEomBORaiFtI6ca+724SoOmUg6UNqIQdml\nrA0xk5jH/itlNEcaKJtMctcMGWhoiF2uqln2nn6P7Ys+AuiBfbKYneP6GG3b\n5+8tasf39Vz+ixFcWlknDxK69pUVya42zCI25juIQhsP6XX8DaH1P5lC1QK8\nyT3Onts4IqK19GQq7zHURTYnYyctyPhWc9PdJrrvKKwfXUjgqU55jEIK13tY\nc7BskTmVSn5id6V9bqsoz6ElfSj52md7rbldwi2CvESjRkOb3CLvKxsAdqGE\nIM5S\r\n=BMuz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAGBvbKFtqvqE5qKwpKkZHdIX770VPpq0f/prxIna+CTAiAPILXiZkHS8Cp9cFSQWjpvJ/OzRs9hOAcnmA0+yq+/ng=="}]},"maintainers":[{"name":"dww","email":"dwwoelfel@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pg-pubsub_4.4.4-alpha.0_1551897713612_0.9202981289421164"},"_hasShrinkwrap":false},"4.4.5-alpha.0":{"publishConfig":{"access":"public"},"name":"@dwwoelfel/pg-pubsub","version":"4.4.5-alpha.0","description":"Subscriptions plugin for PostGraphile using PostgreSQL's LISTEN/NOTIFY","main":"dist/index.js","scripts":{"db:init":"psql -X1v ON_ERROR_STOP=1 -v VERBOSITY=verbose -f __tests__/schema.sql \"$TEST_DATABASE_URL\"","test":"npm run db:init && jest -i","prepack":"tsc","tslint":"prettier --list-different 'src/**/*' && tslint --config ../../tslint.json --project tsconfig.json","watch":"tsc --watch"},"repository":{"type":"git","url":"git+ssh://git@github.com/graphile/graphile-engine.git"},"keywords":["pg","Postgres","plugin","PostgreSQL","Graphile","PostGraphile","subscriptions","realtime"],"author":{"name":"Benjie Gillam","email":"code@benjiegillam.com"},"license":"MIT","bugs":{"url":"https://github.com/graphile/graphile-engine/issues"},"homepage":"https://github.com/graphile/graphile-engine/tree/master/packages/pg-pubsub#readme","dependencies":{"@types/debug":"^4.1.2","@types/graphql":"^14.0.7","@types/pg":"^7.4.13","debug":"^4.1.1","graphql-subscriptions":"^1.0.0"},"peerDependencies":{"@dwwoelfel/graphile-build":"4.x","graphql":">=0.6 <15","postgraphile":"^4.4.0-alpha.0"},"devDependencies":{"@types/jest":"^24.0.5","graphql":">=0.6 <15","jest":"23.x","mock-req":"^0.2.0","mock-res":"^0.5.0","pg":">=6.5 <8","postgraphile":"^4.4.0-beta.0","ts-jest":"^23.10.5","typescript":"^3.3.1"},"gitHead":"13938f563b26a0a7ccacd8f02376bb8f0ce8d0e5","_resolved":"","_integrity":"","_from":"file:dwwoelfel-pg-pubsub-4.4.5-alpha.0.tgz","_id":"@dwwoelfel/pg-pubsub@4.4.5-alpha.0","_npmVersion":"6.4.1","_nodeVersion":"11.0.0","_npmUser":{"name":"dww","email":"dwwoelfel@gmail.com"},"dist":{"integrity":"sha512-mAQKkGtvN3XUGdcIJv6BSh2kjfMrrEtY6wGo8WCyKGNHzSQKCEHvut7PwjCDkVbH11l0EEMJXl0woynxXG0oXg==","shasum":"25855434b0bbd3840c3794297cf36e6863686bcd","tarball":"https://registry.npmjs.org/@dwwoelfel/pg-pubsub/-/pg-pubsub-4.4.5-alpha.0.tgz","fileCount":12,"unpackedSize":33895,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgBYTCRA9TVsSAnZWagAAfcIP/0LiTtAMmuVKWjPBA3hZ\nYMrZlDAAzDmWfl2o8wQOrUpPgWtf3ta7/IJWA5vTES13Vcd+qtnsirY4RkvH\nbf39k+BJaCfHMqQ8WRwZWB2j12ohMnQVMOYIE3YnhwW2LfXE5Fm2hCpF5HOk\n3FShRww/tJE7mbL7QjasPqJjfHhIWcbMAnUKJ2rRMNigj5bSpR68Nnr3ksrT\n58/QgHlkmHMi/On1xe4Lnk26sCXLMIBUi36wj4p5BkQPgt1RB24bIfvar0jC\n78dQ8SLP3MXjRt9wftUTqtwjrwST6lAM4jmzSdu0wQBXIu9aR8ehGgdyXqCc\nfVswpnAdixA8Ep88dMXjJnPgbAljovOQs1G+3x2bDKLLG8NZCnDTEFcLIwLb\n1L73Eu+ET2VtbrVPU04a3WvzKdNiskIC+HNsaHXD1vzY/5YvYjYwWmAJ2Lhd\nXh7iL9U8y6JVMIJNNHsC8RU2F9y//ENJfASecqbatzG2zDAz/VQVMxa/5xsC\njEP1zsJ2cAU4U0L1aX8iYJu5Uq4iSpg1J9NPjq0xoKtghvu6aKosSeBavGV7\nOnT0t0ebuMAyGChd1C8oA2ZYTpfS0Hae1r3vgWDxuZr1IJ0Cxy8UroRWfjJv\nwluL70Tit99tsY5XdtWBd6Y0lKqyc5OuIqgQTG9l/ECfyuylazokQj4qBHBH\ntQY8\r\n=s+kg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICAkzfJN+4Xh2BxFqAsbe9v2TNjBHt7rlUR1GKYtnOgsAiEA2spBw3b9iAwNPUdHxLTbV9VpLE0oe/K8I/jVUYumSgo="}]},"maintainers":[{"name":"dww","email":"dwwoelfel@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pg-pubsub_4.4.5-alpha.0_1551898130658_0.16474782711309732"},"_hasShrinkwrap":false}},"time":{"created":"2019-03-06T18:20:42.509Z","4.4.3-alpha.0":"2019-03-06T18:20:43.076Z","modified":"2022-04-05T06:13:22.851Z","4.4.4-alpha.0":"2019-03-06T18:41:53.754Z","4.4.5-alpha.0":"2019-03-06T18:48:50.770Z"},"maintainers":[{"name":"dww","email":"dwwoelfel@gmail.com"}],"description":"Subscriptions plugin for PostGraphile using PostgreSQL's LISTEN/NOTIFY","homepage":"https://github.com/graphile/graphile-engine/tree/master/packages/pg-pubsub#readme","keywords":["pg","Postgres","plugin","PostgreSQL","Graphile","PostGraphile","subscriptions","realtime"],"repository":{"type":"git","url":"git+ssh://git@github.com/graphile/graphile-engine.git"},"author":{"name":"Benjie Gillam","email":"code@benjiegillam.com"},"bugs":{"url":"https://github.com/graphile/graphile-engine/issues"},"license":"MIT","readme":"# @graphile/pg-pubsub\n\nThis PostGraphile [server\nplugin](https://www.graphile.org/postgraphile/plugins/) provides a `pubsub`\ninstance to [schema\nplugins](https://www.graphile.org/postgraphile/extending/) that uses\nPostgreSQL `LISTEN`/`NOTIFY` to provide realtime features.\n\nAlso adds support for `@pgSubscriptions` directive to easily define your own\nsubscriptions using LISTEN/NOTIFY with `makeExtendSchemaPlugin`; and adds the\n`--simple-subscriptions` feature which, when enabled, adds a simple `listen`\nsubscription field to your GraphQL API.\n\nIt's intended that you use this plugin as a provider of realtime data to\nother plugins which can use it to add subscription fields to your API.\n\nFor full documentation, see: https://www.graphile.org/postgraphile/subscriptions/\n\n## Usage\n\nCLI:\n\n```\nyarn add @graphile/pg-pubsub\n\npostgraphile \\\n  --plugins @graphile/pg-pubsub \\\n  --subscriptions \\\n  --simple-subscriptions \\\n  -c postgres:///mydb\n```\n\nLibrary:\n\n```js\nconst express = require(\"express\");\nconst { postgraphile, makePluginHook } = require(\"postgraphile\");\nconst { default: PgPubsub } = require(\"@graphile/pg-pubsub\");\n\nconst pluginHook = makePluginHook([PgPubsub]);\n\nconst postgraphileOptions = {\n  pluginHook,\n  subscriptions: true, // Enable PostGraphile websocket capabilities\n  simpleSubscriptions: true, // Add the `listen` subscription field\n  websocketMiddlewares: [\n    // Add whatever middlewares you need here, note that they should only\n    // manipulate properties on req/res, they must not sent response data. e.g.:\n    //\n    //   require('express-session')(),\n    //   require('passport').initialize(),\n    //   require('passport').session(),\n  ],\n};\n\nconst app = express();\napp.use(postgraphile(databaseUrl, \"app_public\", postgraphileOptions));\napp.listen(parseInt(process.env.PORT, 10) || 3000);\n```\n","readmeFilename":"README.md"}