{"_id":"redux-graphql-subscriptions","_rev":"66-dcdd0d3e637718e49ed3c9e974c16f2d","name":"redux-graphql-subscriptions","description":"A Redux middleware for managing GraphQL Subscriptions.","dist-tags":{"latest":"0.0.9","next":"2.0.0-alpha.7"},"versions":{"0.0.1":{"name":"redux-graphql-subscriptions","version":"0.0.1","description":"A Redux middleware for managing GraphQL Subscriptions.","main":"src/index.js","directories":{"test":"tests"},"dependencies":{"subscriptions-transport-ws":"^0.8.2"},"devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git@github.com-hally9k:hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"hally9k"},"license":"MIT","gitHead":"c3f191264b8e416167a7654455bb0554ab70e1ee","_id":"redux-graphql-subscriptions@0.0.1","_npmVersion":"5.3.0","_nodeVersion":"8.1.2","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-YNOZhc3TptEo46IldKaxLVbEu4CmvMs8KgjjJ45Oj0+Aqz1M8Tf3y0CZKRZm4omxJOmvnGi4KvX98srXdJF6hQ==","shasum":"7f91bed13471cd6ec880f8117c45fb2aabd7a09c","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-0.0.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCmC4Rvp15RMr+az9eFQJEQzGcHM0vZ58SEldvk1rcKGwIgPHGflb9xt1Ai/0p+UOeoeOqXN3top5RrisGFm46II/0="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions-0.0.1.tgz_1502610004407_0.8636869499459863"}},"0.0.2":{"name":"redux-graphql-subscriptions","version":"0.0.2","description":"A Redux middleware for managing GraphQL Subscriptions.","main":"src/index.js","directories":{"test":"tests"},"dependencies":{"subscriptions-transport-ws":"^0.8.2"},"devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git@github.com-hally9k:hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"hally9k"},"license":"MIT","gitHead":"037b1d9bce42c1ad7fc818d9c07ec7fab89f4a22","_id":"redux-graphql-subscriptions@0.0.2","_npmVersion":"5.3.0","_nodeVersion":"8.1.2","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-JSP1qi/0HC1pGFH6I8zwhWabwElhZyLiSMaHw7coqi/2rAJd0ZcVMW421b/w67LhRdLwaEjvE1vOQgmQMEGpdA==","shasum":"432719d7d0d0ff6df7b36bd9331b9502a7d023ad","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-0.0.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1f14eKazE1mtukup+vXF2soF4vQYGwjau1beltiII7gIhAL3yyFc1Pu5bLCp/gVm1GTYoyP2GxRXV4xHuhz5/tipP"}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions-0.0.2.tgz_1502617448156_0.3622054918669164"}},"0.0.3":{"name":"redux-graphql-subscriptions","version":"0.0.3","description":"A Redux middleware for managing GraphQL Subscriptions.","main":"src/index.js","directories":{"test":"tests"},"dependencies":{"subscriptions-transport-ws":"^0.8.2"},"devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","gitHead":"9b0ed4fda40b864a22bf971abde4e1c1b39a9807","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@0.0.3","_npmVersion":"5.3.0","_nodeVersion":"8.1.2","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-EZimf2PzcEnQiUYrweA8Tp+TGJFv3TkQA+znDDTLZT4iiASngXGLxWfDxJwAcxwqrt8LN0YagvEQAAv0H4af6g==","shasum":"909cd85fedc2026533eeadba459d07ec7f4d51f4","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-0.0.3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCvy0h3BAAZW8yrxJxWZEgvwkO1cw5MSNssebsWQS9CrgIhAO/NDAahaVf3zJCYevF4fK/k09SrqhULFsDOw5Lc0UUE"}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions-0.0.3.tgz_1502666759004_0.5346021200530231"}},"0.0.4":{"name":"redux-graphql-subscriptions","version":"0.0.4","description":"A Redux middleware for managing GraphQL Subscriptions.","main":"src/index.js","directories":{"test":"tests"},"dependencies":{"subscriptions-transport-ws":"^0.8.2"},"devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"redux":">= 3.7.0"},"repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","gitHead":"d8711bb5379f702312b657c5ffd9a1c48a7380d4","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@0.0.4","_npmVersion":"5.3.0","_nodeVersion":"8.1.2","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-znUAXy2LSgCJ410HOOq08/NOJ3+Kp7FD3mDtSaCY3XSKh00a8WsxWSiQl/dv1Xs4++lnHgmZIOIMvbkQvIusYA==","shasum":"4326e09575dd96d720007fac6a1c1b01a6803e55","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-0.0.4.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC2I/3tBI/LWKoK5lt2sDt8wWidVn99/3tkXy65N6ybVwIhAOpQiZGhyB4XP+aJzqgKlh/U7GQhc1xMtTlOF5R/impH"}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions-0.0.4.tgz_1502680597312_0.8313730866648257"}},"0.0.5":{"name":"redux-graphql-subscriptions","version":"0.0.5","description":"A Redux middleware for managing GraphQL Subscriptions.","main":"src/index.js","directories":{"test":"tests"},"dependencies":{"graphql":"^0.11.2","subscriptions-transport-ws":"^0.8.2"},"devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"redux":">= 3.7.0"},"repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","gitHead":"707e548ea11b1aadb208907e76e618dc28ac0b91","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@0.0.5","_npmVersion":"5.4.0","_nodeVersion":"8.1.2","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-e8EkmfFF7Ba4HgVQas+ReFf4cl1o/uO2rLSoS1rMOGXs0wzTWGVnWIfCKa6EsuuhAjonUPwUd7vSXOzp4Q/nvQ==","shasum":"c6e8f9683ebb3335157d1e3b5391e108d31384ba","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-0.0.5.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6/ZznCS+l/vX2gGXvyZbkQYj/9MjmekiDd6kYj3UxcwIgPlAsUzmhmAddtJ675XcnFChOLTGp/gT0SLB/aicuAMA="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions-0.0.5.tgz_1504616200725_0.550550552085042"}},"0.0.6":{"name":"redux-graphql-subscriptions","version":"0.0.6","description":"A Redux middleware for managing GraphQL Subscriptions.","main":"src/index.js","directories":{"test":"tests"},"dependencies":{"graphql":"^0.11.2","subscriptions-transport-ws":"^0.8.2"},"devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"redux":">= 3.7.0"},"repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","gitHead":"a3aa82631edd13787ef10c16d1a05da5f3e328c2","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@0.0.6","_npmVersion":"5.4.2","_nodeVersion":"8.1.2","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-yK0MoslknXUzfoFnEXNLcAO7tyN1kyzSWTKwYdvkHfGUwtLQBtt6pWXG3cEswQ8eYfcFaKlldnUEVuNlsbPIcQ==","shasum":"e17ee27382e144f15d8aa1f0a66e4a340bb75b1d","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-0.0.6.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDE2b4tY5jxs1DiJCXtXCefRMN6a0y4oixXOImac7G+uAiEAoIUqELMUcuWiTgsHh5gc6DLYWfGyQ1pR7eWfXYo5rDQ="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions-0.0.6.tgz_1505895583701_0.9145067010540515"}},"0.0.7":{"name":"redux-graphql-subscriptions","version":"0.0.7","description":"A Redux middleware for managing GraphQL Subscriptions.","main":"src/index.js","directories":{"test":"tests"},"dependencies":{"graphql":"^0.11.3","subscriptions-transport-ws":"^0.9.0"},"devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"redux":">= 3.7.0"},"repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","gitHead":"a3aa82631edd13787ef10c16d1a05da5f3e328c2","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@0.0.7","_npmVersion":"5.4.2","_nodeVersion":"8.1.2","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-zSe6WIXZirfskKhNJD7qnEmhcjtzSZL6TZmVWzezocaqqJdahHIzAr1mtXX/wF0nK2QsWbmViQuFzYd4V5p7IQ==","shasum":"b267f98b6d7d32fc015f5d7ba70831f284dc161c","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-0.0.7.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9drWr9v4mMm1ig5rqerZF/CLD89Xd3Wr0RHgUBfXU9gIhAIium+hIcTsQD2WuG9nUZ+f6WqG6cUHDK1QtGTbNFVdY"}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions-0.0.7.tgz_1505895840671_0.5247478601522744"}},"0.0.8":{"name":"redux-graphql-subscriptions","version":"0.0.8","description":"A Redux middleware for managing GraphQL Subscriptions.","main":"src/index.js","directories":{"test":"tests"},"dependencies":{"graphql":"^0.11.3","subscriptions-transport-ws":"^0.9.0"},"devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"redux":">= 3.7.0"},"repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","gitHead":"a3aa82631edd13787ef10c16d1a05da5f3e328c2","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@0.0.8","_npmVersion":"5.4.2","_nodeVersion":"8.1.2","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-SrlW/ZFm8E3w+bpiqTb8HBmcwURqTyBj7M++8rIeiiQA74q0FQx/hPoo/p7DS4s6mxJ+HRzjlHbeMnv6OnKH+A==","shasum":"6a8cf0cdb10359e85b4975f70fc6e98654c427b4","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-0.0.8.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAoFjG8IootEGeBOFZaG/RI0f3C+HGBnKo26TDCEcEn4AiA4oLr9R6Ouq8kRcE6A9y2s+vyClGbA1+3qEne43AAJWg=="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions-0.0.8.tgz_1505946071140_0.6908829843159765"}},"0.0.9":{"name":"redux-graphql-subscriptions","version":"0.0.9","description":"A Redux middleware for managing GraphQL Subscriptions.","main":"src/index.js","directories":{"test":"tests"},"dependencies":{"graphql":"^0.11.3","subscriptions-transport-ws":"^0.9.0"},"devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"peerDependencies":{"redux":">= 3.7.0"},"repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","gitHead":"a3aa82631edd13787ef10c16d1a05da5f3e328c2","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@0.0.9","_npmVersion":"5.4.2","_nodeVersion":"8.1.2","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-uomcxVhXMsZJzSzX0qym1ooRJYHEJVuyUDdJFi0vcPOxKqhqRxim01+CvkvCKgi75oBK/IrkGk963V/WfsNi7g==","shasum":"1e8deace999d6af8dbb1a8a4a02fd1fcd961d673","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-0.0.9.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDMmNG5RpFP0YF3vlw5FFN+sQlzdFlea4GGtmPPtWtbtAiEA+7CLppwqM0eTTlYuzXjFlC4YoHgjc3t4QC7K0a+kpDY="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions-0.0.9.tgz_1506049087923_0.3762754399795085"}},"1.0.0-alpha.1":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.1","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","jest":"^23.6.0"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws":">=0.9.15"},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"b6602786de8b2f9730f7c7d54ad8cf31a1d9acc7","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.1","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-PZH4hsJBSPGzYb2kKCGfJaii4yEtzjNOAz+hhppYGFrc5uOi2wlc+rBKKnOHFql5n8Dm2iVeDXuOCgiH26cZVw==","shasum":"c06ea803f3e765d69431d16aeb6bec577ed6d6f6","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.1.tgz","fileCount":37,"unpackedSize":537871,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb/0X4CRA9TVsSAnZWagAA72kP/j3M/tdgGV4esZtdUEbX\nF+GhxdkesJ2NiUX6Gvgj1GQu6Q4TqJXRe/UU5czdIMDH0F8nYRjenb+CyF6m\n0W5c7wxyKLEeVKUy904j8+KF+InbJblb1Y9LiHQNtqqIpO/DdCY5xlCxeRAn\nlBh69OfExCxSgB5BxuSgGudx3DqsU0g+3Mrn8LbvIbq8Ocdrwfg2rkbx60+8\nj0giKbn1fkcR1cYyrFpMzlMhZ+DN3rOPW7UvDsrKZiIQ0oonvY7NMUl1TIlA\nRLEnjGXbkhEFy+WIIvHpUqjMLTxnUttTsOMr/cZdT99/1yzRhQbLFOY/xShA\nP7orWTS0jMzx/hrjXhHQE0MPnOKdmj3TbbEQntsqlXM8SOrevNNbaVKD8Gn4\nsz1VhqNo8FeY1q2dTAxqS6FH2idR928n22w3DRS/AbRFjGrN+vrl1U3uyY+Q\npJu4tmP7FI6lJX4ose1Xvr5VhmqpFNww6ffwnHIZIPAV3dA6MgniBaKl+XOq\nXTItxOLvIOh0w16DBxJzcmQw8d/Xdqsivow7DHuJtpGJ4QOyF/FrvLO4+udy\neImJn6gZ/YXJB5z70gcZvAwuEeZVLjn6/C7lFH4/l5Kh5qZ8Cgm7pI/h90cq\noY+hgkDZ2P8ktadGa6vB7iqjOu3fFDdWwnHHybC0+YmB+5A3Zl+O8QXc/XIm\nkdI6\r\n=dI9m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHzueTpXyJ1I5IRTyH7Kck2toDq4ScVAPcCh4b/p9ht6AiEAzeBL6E1KBAy8NxTkXSA4jSGy4JPjoWNxYX9vXr1/1ok="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.1_1543456247537_0.7085414556935883"},"_hasShrinkwrap":false},"1.0.0-alpha.2":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.2","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws":"^0.9.15"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws":">=0.9.15"},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"18e9142de7d8ec1b9dd30c503d08e99c13928d4b","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.2","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-DdxfaLBiqLrvXP0SO1VHciPd2NJ0C8t42hXW3c2c90EdImYdWHmfWdQ0Vw3PwJUHVsFFAgpOrxw44VLhepUDEA==","shasum":"90a8368f8825955ab876a534cb532ff93a052252","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.2.tgz","fileCount":37,"unpackedSize":539696,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb/0jQCRA9TVsSAnZWagAA0qUP/2UQTjlBczf2YG75s0wo\nns3ZW9Jkpdj8SyHEKBz+XI6iaa5FIkK6xifW8y67laz2gmTUZdDHDFCnMMdH\nJBDxKVQhWUM9F/IVgdt6olRUUAShcjrVBHHXVJeBiAgMQR/eFwRd19QphasL\nPknSYp1aK2tuQlvZ3vHk6gyvS4JWKlFktW2Vcngd7GaQk0y0UaV5Ye3HCHAn\nSkqpPxuKr8zPYt5Hhc7U5NDDUbO3P3Ogu+u/sCl/2Z7m3ML3w6VXJOOQrwFF\nAEolfLcNPm3i/Ugvl9OZUavYSgdBWHEVUfEWb2A5bP0i+iwj/++xX5pfrLp5\nYdQNyJEe7rh9pPZ/5F5R+hAUPkxbZ+5TuRPRiNnqR5X7cuGIOSZXtTgPRK28\nWtiHkJqOlCjHSQT0fBSXuHVpU+ruFBQn8REd02vZTd+tGuUfxdE2MLl8uuWO\n2PtyaKkcmmABSe7WZ53ALhWZNcGBXY8ghwz2QDUOs5tnRlKeploawxzwUCzy\n1ufpq7xdkaqZVwWmATPRCEf+iQWLx+BeICzI1KPzGe9i98HHDB/xWiMj/LG3\n3dADLZ+NFdSX7dRQn8AHfaIYFZwqdyn/AZjoKfH9kvidTDXdLdC+Ta090uLy\n2YkNgOiS2BuXbIF0+4H1UxvnPAVxF1LBgrcnM3lYZvbByDZCn4ZmUr38Q8Ib\nZk9u\r\n=OZmw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD1AtKqrkadISaE8/HWJDrzW9786hktbEMpEjwIIKFIrwIhAO1O2NE5i1YxioC12VeEZXpD7/2Xd6sAXyN5DibZMtDi"}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.2_1543456975595_0.1805794760165691"},"_hasShrinkwrap":false},"1.0.0-alpha.4":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.4","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"^0.0.1-alpha.1"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.1"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"7bbb73434e73b16f9fb7f23747e13781f232b3df","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.4","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-wWAkFKvGBbo6L2vbnsD1nBrHu/TndRCAgDqSPO88/4SBzXlYNfXxnTKYcQg5qgkIYnBhPG8nIJQGDe99Wy4nUQ==","shasum":"2fdad0b87c2bc1ca9cff9278c96c2ca4823114c3","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.4.tgz","fileCount":37,"unpackedSize":539884,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCIZKCRA9TVsSAnZWagAArnMP/0W7kbzDOZCL5Bgl0Hf5\n4q9ujn2Fy8KEelJWRsh80iht2ogoZWbWNMTOt+58ZeMi45UoSqbvyYcFtKII\nXKpUh6QrTq+zrwPIS5RBOTJqn+uzm+mbqcpvMfbX0+tHaJOwCx1P1O64l7jd\nUd3ZLkOZKhf/1tg+JGLtsyPjPbPvsJnMmeri0qTFq30KpeEdTJ4GffftC8ID\nMSXwdHut5U5j3gibiYeEG3oAqgsVuvTs4ojE1Y0mr0RfQPJoaAXH9CmGUa8i\nhn9TxBkHeV49bqlYIaaLtI6GayoLU/o8Gy/lXVCP4SgDi0F22eSrqTR+/wfi\nblh4pM4KYhvEmoZ4UlwmFtDzs5McY6K45aPkLJpUvfS/nrAG4dkhRM2U+Kyd\nvGnPj9Cvdu8z36jvEvo8dc27Cg1TGAiHkYwMSIRRqwVSLZGCgecEJDNiwsvd\nJrRDpT5ehl/OVIaC4WtjHrgTiHteaTVOEa/O0GrjSkT4naAq6w132mkM3opk\njH6R8Dl14cmq2HhTJ+ebC/7g2M+U0LlD0ReaIHmVcUCyPOhtcHw8m24ZER8N\nvAbkZkySgI9zWYPSKhiIuMbDGsN/HTo5HTcKcDW4gYCU4Ad96T6u8Rr5zFL0\nS7sFMhJ0qtmP8cRxbVeJYD8Z2QEYZEpr8da3t13O8PlZdOg08d2vw9zXvq2e\naovT\r\n=e4pB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEHGRO0ioQp9Sc27O+i8+7N6l09RlsqvMjdAoa2nqP2HAiAauCmbhRcT5/v7BcWcqStWUHxeim9feyHsGwUWr7p3jg=="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.4_1544062538260_0.1903107435502276"},"_hasShrinkwrap":false},"1.0.0-alpha.5":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.5","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"^0.0.1-alpha.1"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.1"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"7bbb73434e73b16f9fb7f23747e13781f232b3df","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.5","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-rmXALRnu15YWdVNKCpOEtTIs2x+HmSK60LI5aizjgbYrudB22BXTVE5r1XJ1L2TSNNQVDCkQLlSo8gi6/Lc+Ng==","shasum":"00903d17d2949870b3bc6f2b0921f01cfb79570e","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.5.tgz","fileCount":37,"unpackedSize":540150,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCIdnCRA9TVsSAnZWagAAoXsQAKRomDQVHMzY3FyHtwjz\n+KI+6XRff0xV4bVVeqH97+e2+fPj6t50FJBGNC2sTu1C9+nqCxhF8gD7O9cO\ndiEJlIAcRh1fxmMiUWnoh2evdBDQj1XX0oXr1LP7Gy3LWyVYcKsOWtKh3k7u\njeEAVADtRFKPnRG7iCBvCV2ZMM6BxhkWvDw3/9luImvOUuhx4X2NfHqhDhsK\nDaec9GyRd/ZIlK08wVinYlA/B/Vg4pBz/ASj/foiNVOx0VPbBzDP+NGfgyj9\n75Qdh2fmUHOidyYYU2OlYVrt845ltobuQJBR5MBcnS95kDv+trqIQdMR+9nc\ns1LFOAtxtOLbMWUgVmrkLGnDGajyR+9ZE2cic7wHdKtgIbDkjNSqSWhJFMdg\nRB3TTZPfiey48BkMp3zMGNQnZMn6xeAQ7ESQ+7+WainxQ7DAwRHK0XSdTWOL\njVxaQlm9JrFwb6CkGL/gwg80B/BLIQt2B6Z9Cl0cQclngtZMWR6RdKQk0WfD\nm+vmft0wXsdAfz/TYG9++hhpGu4uYUWiBqgUodiFjccDFviggrDk2kC1ujBV\nhV9sPTXh8NfuVavJujl0jReuF4nOKbHjahyohi41KhkcnI73pngfPad7v+R4\nEVKmNrU7DCdheWLlr7wTxK6BM4fPpQwLu7OMc/89GHmt0uM+4Fto3AKmZ7IU\nZY3N\r\n=N3+T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFwulWi4EarWC05MuIuDWcugx28J+4eNgEbepZ7eEiVTAiA/ZWA58R7ohT//iguN59IRBd7VN9a5/ZR3s3k4pwPmDQ=="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.5_1544062822587_0.7598093204937515"},"_hasShrinkwrap":false},"1.0.0-alpha.6":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.6","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"^0.0.1-alpha.1"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.1"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"48d3ca46174b2c6fb0739113b748f8e88b7d37a1","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.6","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-GJGnXdf8HDCGO+NpeCfwTWjGLlZ4//CH5tmnHUTOOqDlZtNGWU0a3iXWTAxmRZlY7kFwIAPBZZhtYPCQYU5mNg==","shasum":"15d88e614fe7c030d4ea2784b5de81a9e00287f7","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.6.tgz","fileCount":37,"unpackedSize":540197,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCIi4CRA9TVsSAnZWagAAJPAP/0rbTB2xz5hPWsMsVvYV\nThDrPfkLeAGwe87ksEV/CfVlBbzymsb0c19OTzI+qQDCx+2tZ/7J/8b2D+tP\nFOsEoF/vMO0Bofraf3ui7nKAioMf8SUwnmumDsrG9uNrA9/ZHuKVibI/3Rnp\nZX5HH2qHW7SByiw3ivjv5DQ6qxa3hLLBMxjd0GL09fYYvHsZGC/7OPaMB1Kq\n6OYRMkWKR0cBSZtwNV4oJBs52HaQCq/uarmGnSnyTQDp9YdfhpUgApqouvDi\nWA8YK+9/jTwiLmhEs5MIuYRYGrcebJbtkermN60nzXuRj4L0Te3R33Hkza/s\n6mC+hOghXspzoZERggLKBo/Mnaot0cV1b1zlF2Ney9UdEEvqBIPW4UzfE8/3\nENjjGqDOpwwT5VVT9W2LJ4OAVRg/XJ8z5+gwO/m0K3/dMxhq9645dYijmrjc\nC5pUHaOc2tuzFCZK8hSxjWLMMcGVA0lUjdUWypiO6s5AC170SN+cCcBHiDUC\nbm+mtp9s9hyDavtIEBhmk33a9+javSbOB0/gJZAbegpeVpGwciWDUAyK8FkC\nVo6VMx0NxLFYwkmznAu3vnaYoaNTRLAaUpj4UUNkM3mx9oekGSeuIO79mude\nnroe1ihG1OrRu0IKz8I8CxakX58+plf5ncYSAOjeZR2gqJY0w/5Nog9t4JcH\nm1mk\r\n=k0dB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHECM24uT9j84pVbavhacGJly9KKftdWbHxHSh0oe+hhAiEAns5DuBz96AgfZb7rqxodUrgn8YGUJldN2GriCJgT808="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.6_1544063159649_0.25943731614316357"},"_hasShrinkwrap":false},"1.0.0-alpha.7":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.7","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.2"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.2"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"f8f7a7941656d14a8391e8ef9b08a94d8afd5c69","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.7","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-L4zB4tIq380ji/bHfMNo7TJwXsUL7+t2/lvklfIyOJdlIyhB7IFS95nYvoyPj5wBi/zPNlkBNifzvCHQS1wJ5A==","shasum":"b3dc27a93dcf3b1c29a544ccf7e2814a90c35610","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.7.tgz","fileCount":37,"unpackedSize":540195,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCIpRCRA9TVsSAnZWagAAgeEP/RlUe3kvum85DMbUN+1T\nmWd0EXyFgD3LE3mdeIyTw5n2uU6BlP+/cOEU+JeU4pBu0OhGH6V7EaeRl6Cm\nr4jd8DVuKFZbJ15KVysbFgP86pvQJ0m56eMw+GODiiZsHAPiC8qAq/FR37PA\n715Zqfk9wQk2AqKIjXgE50+Z/TrksHpARkP8kbh2Xljbp0CPH2OV4/GZPaEQ\nsOVIX7fsVDmjfg40+sajwmVFP493uTtl1FciNBGNh8KPdU2NOLnzsweIQ6bb\nW4nN40E6IFBqbXOyP1g0tqrOaqfhha8lErzgYRLUZ6NwMCJqmv7ZN8MRKEtz\nDm2m6DbNAWxjhdVQv2zNhZyK/39SnC1Dtppb/O34pB69xuOpuuy7Zz8628o2\nIuzTaoSp18R5xLt2iqsnIEkkjDCJ4JiZN0d6caa0hvIC4LZdFRHLGiZGLdSL\n8HvI1GlXrycfVifs0wNAcwvr9yTaJyiF3ej0vLzCs7eAgvwRcksWOBbdwRjF\nu9x+SxrePbGrrEtjSrBm5TVRfNuhX1DS/yLV1UqJerL1W5ijSFmoE7R3Cjib\njKlThusGj9yVM+3XUzIl8udozM7WJ1UmMTVlt+beWQ0fZRt+XRZhLGOU8L8m\nj79kmwb7c4gBXycQ3D0l579Vq7PC7GpJZ7msIb+HRCjahF5EVBX4hSDjzSzs\n/una\r\n=AgZT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMzwzDVnxw1nCaed6Kbi0ejcv0goz36B1Y2FBCKrbFNAIhALR0sNJKMpF7jB5gqoz0jMVNN/Wb04fNXWM9tNtvI5gm"}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.7_1544063568421_0.9443092256737791"},"_hasShrinkwrap":false},"1.0.0-alpha.8":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.8","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.3"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.3"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"f8f7a7941656d14a8391e8ef9b08a94d8afd5c69","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.8","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-ja2hlRQFlvW5QCMWMOfkbBaOh8bIOwa2GEgI+A4cx8FI+CNMjWMyPH7wnjFudkVDlSCd22ae/TbujwBP5uthWw==","shasum":"f89815685a6b026289676bd3d79c31f59c7f5c11","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.8.tgz","fileCount":37,"unpackedSize":541297,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCJAmCRA9TVsSAnZWagAAe1cP/1SqfsUoKVL06522V3IF\nChEzcH1jaw065dxTAEf0gC6JYRuBypP0d/0LWmoQoCdVouHHX/2pipoVYnei\nokrCRXvR9gazS4p6Pu+MapOHiZrot5i4fyVApmfZUAYiyIHrf9wXerQdzkbb\nA9BnKYacJUMq26da1+lJ/cE1QPeKj9pJbDzx8GURw1rsV7XQB6v7fxlnCYFn\nEukGTDcBBpKUselfhI4c7JYjgJU+Quzxk5LMnqQhyP0z+1AKOBP3IYgK6AZh\nI1y1IIavsFs529cR57iHX9rfwLTlpSCzkHATsP38DSZnX1FXyqQUMPPxRFcu\nxmMTO8Psk52iSjP1GzK9FT6zEM02AnnxLVVwUzm812xGJp+oG7vBw4cnFG7Z\nq3YIx2E0Z4cd8IU9cqSuxOJUUkgL+VA46G3b6oS91+Dp4APUeNBWu6hibA3H\nd6Nzr1y+rdPu2+EvRcTr17IgfKJ6cN1LUFYnJCJ8bre0pT1JUj6d8KDNiEXS\n3vp1sXxY6hUpD1ELmK39YqapOafIBlBKLQnjd6XcrDP2W5s3TNWW33XGMvc6\n3VcOkawpt9zDSzdYENHiCosAAWeADpkrsgYCycRQCjeuxrjJ/OXso9bRRDct\nleu/Xj+viRi/QCqEC15qErSlDjyzMtce0RLSBaRCS0NS9zenQ6hvfahvjDXt\n2tGc\r\n=YYs4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDUe5pGthb5CIUt24EK2UKlmB7t46dojZ6/WXwK55qzDAIhAIIMz38ujayziBRqGQ13eoQg6JI7ncOyApmWNSzoFEIM"}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.8_1544065062053_0.9152815370618892"},"_hasShrinkwrap":false},"1.0.0-alpha.9":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.9","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.3"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.3"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"5fb964b376451117f688cb16fc8cd47ce58103cb","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.9","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-wc4sYrKjqlV8pu+8vxMAuffHCXNGZrkWG49i0vcNHO1jmK6l1pkTRYlMIXpv04VRjN+n5cGeS/+SEs74EJqjZQ==","shasum":"70bac19b19d0e2d476beb979b8a6d1e01c473e66","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.9.tgz","fileCount":37,"unpackedSize":541790,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCZqDCRA9TVsSAnZWagAAPX4P+gNy4Zipqzug+Qh/K9Zc\nm9A3A6wOuwORFQOIb9VeuHKcsl7ijstRdhfRz9aZUocGRTfpsxnwLvSonJvE\ncd7R9ona+EM5OGOEMa0tEH8ye4LcbjNKL13XFjblecOwiOW067/bwvnbJCjU\nnIFIMVIJkTln4RferFMJP5wSxPE1CLrR8rLrzpMJCoVOOFCU1uUCCchv1VEJ\ncfiOHAcXGkq2lxv6D+tyDMhXuj+RlcQpa99TlbOR27h7MnCsobazIvF6WemL\nebbcbHeiG9AVfmn5x3pn39YvD+nIzm88GcDw4Po7rUvgdkA6ncr1cz/fw+13\nGNuCBgbxN0jxUJdlkyCrkH6TUy8YYUmYHDJB50CQw+1Ja3r2Ud+DuEv3H1Af\n2yjGQnVazniLkYxL4Gyb7vxlAlSntLcXXKK38xSz4cRhWuAnCIdakAZ+eT/X\nNhY/Mt+cQ3vNmpgw466+yJ6Gzrg8vAwopJxh6ZEdOX9166x6u7XdJEiewNQR\nUZL6WWm1Q0qjGVw5JIQ4T2DqAALmTxi0Vxkfkg5gGC3QGUC715pa/0OZh4zK\n3q3Ih8dFQiriFu7ZoiUyRRiWm2mxJMqv0ZBWX2PBCGFxxFss0PyUxKrSU9BJ\nAxPwH71HpokKSDa40N2IFPQtj7mBXLwCccwMzWaRQCq5e1iz2EIQxdMIKthZ\nDASh\r\n=R2nu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF8mpJgNs7OIBlsGkDTXaZjYGC1feGP7PtoOaN3KCNVSAiEA0pMJq7hh+TXInQtae9rGF9WAWK3QGi8HsCZLHVumsho="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.9_1544133250272_0.6350114323597102"},"_hasShrinkwrap":false},"1.0.0-alpha.10":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.10","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.3"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.3"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"5fb964b376451117f688cb16fc8cd47ce58103cb","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.10","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-pMPCLA+DpXotWZTBGx2t2U0hjpGNRfnFIYkwMOxptRo1GdiDtzBa23H3Ps9Yv1i9NmMl/+DvKyAicm7f3m1gMQ==","shasum":"15cffb44271ebdc786dbb1fe417fa68d4c2f2ade","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.10.tgz","fileCount":37,"unpackedSize":542883,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCZuNCRA9TVsSAnZWagAAfM8P/1IkmpbtXlwd/gJJKBSP\nVHrGGUGkULeFJyj10Lj6eOPyPlexMF2D/8JvFD6HOcWhyYejBSxLbVb/Val+\nIowFEZxx0i0G6lBAGI4te9I8ho6zumyscEkHZVSltcllv4PV0eL6tEmeLrM5\np4PULN5vRm6Is7c3eBsA2gOm0V3a2GQD2M/wKFjU4S6SS5uFl7Qd7pBPNe7a\nNBZf3Ttw4/Ve352GkEQyOPdY2Nn89HaX3wrc8jcoQ28ZIEHxLcUlHfK2IpB0\n9z+SIaHobrCdboY67mX27adLEP3iV4vXV90xpfE1rdnMgDuzyjZ0Mn8QAsfH\n78AgRB1tnnfwwhQkPplSv3gOkAUD0APJjnnwCctNRU54mCLe/aJmlurGrP1q\nVspUn097GiNx4sjXBDjMDgT6lLHUPJs/m9n7rJkF1PQHu+17KxCwPhG9ftEQ\nTVBH5etj+Z5kRI1w0kwfpaGLbvPA4b6s3DvJmWTAC4ngM+HQ/OFpPEqi2IyY\n/Nk2k2RpvmGoU4Y1crcYXGZG3qkJgOz++HKfJsekPYz369vZa6td7o33qkLg\ng+XE9odok4z9iMEtU1kM1Y53Z9HMmj5ogL0FmvD03SB69qNoHc4lSCDZxbZ1\nM0B2a9p5J7tGy6R9CR6rAMlk3OuCWHY/eBkhypI93gMSKRLKrQPK4rrpy8H5\nxX2d\r\n=9OYI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIO/Tj6ROnPaNNpG3LF95e4ChFyyXzujU5K84MhxQDigIgDXfCPCzH/qwJmxuJpsdayM8PTYrqdoTysWBr5NqZ2sU="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.10_1544133517042_0.9823465713782016"},"_hasShrinkwrap":false},"1.0.0-alpha.11":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.11","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.3"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.3"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"1b8159d1bc04c432202b525b23a1529153aefe89","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.11","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-5OEbLUvpikW5F7R45SlJUWJ+11qs5BK+S0VSkDG1ywQ59cfKzisMIyj1heXmjiWIe6td6JWe8vjMTYc/1fafIQ==","shasum":"94d6ba523777b7bdf3f2462cc7c978e644584369","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.11.tgz","fileCount":37,"unpackedSize":549042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCdKaCRA9TVsSAnZWagAAM3gQAI+2i0mkp2ctFB5mjQVh\nxeepUhBXn1Gp3TRB9JIYOSlKnHLoof553WKhxPr7UKC/Fwlzh16UuAR2/n1O\nNN8DzbrV0IiZY7QGKxNN6oruohF+EYOTuMYcoPtl/TrlC7nmJIDENerpt8YU\n4T03Xm1VyuIW0jdT5uUonJCYjmlyeAgWL6FiiqEkJSdgQLEcqwzZqBNaP6yd\nc82C2226FlQ0mx0pGcKDfEJWGDmRYvfIsh56jhNmF+6dGyKFS/9njBDRvu7w\nBlfwH/FHQE3LNM67HxRv3eqVPs7KP/xwWGP0X1Ax88gc5y1JIV+cSJ60/9zI\nxHWHql/YKfEXnZSZ7CmE+H95Xg1dglS67PHquBHonDkUSES7WCGzXHN0ewsa\nCsAVzJGhKWnAiuHPSTobHcgnsF5jWhTFjCgRjuW+JAF/oBAOxv8IiXHGT53Q\nU6z73YW7w9FFGPRULwvI7YXH7K+jenyeNrcDi65gj5+5jS8WOMh/p77zwIcm\nnNdN/xTb/KxxnW1h8EfQqGwMnWE4a+oRBKRBOfMxsp4JaSZdkpLP/YAEzqPa\nAQM6196ksXOZFK9z3XvJfVPHZpfCkgFChoEIhliLeTlTe9StWHaOVp4KMiAV\nVkiiHQ+gdHoh7+cOH3dtxGG2Kduc/ctctnO29xub85nJtK1arOFByv3kH+dT\nWEuv\r\n=n/AX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCCOqaWWEBvfHMEUUxNcnuw9Gg9lDpMnB/+L5eF+45GoQIhAIVqovKB+ToFGblKNNQ+lOO71aCdzERbkrWLnzw0Tkhz"}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.11_1544147610317_0.22910368030897454"},"_hasShrinkwrap":false},"1.0.0-alpha.12":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.12","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.3"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.3"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"3d12544e078d74b5f0a59628eed72813366c4121","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.12","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-Pd9klXMxEGTYmW4kdbcYvyr5faYOF7Ln7DuOr0A5+frh9ndW8ccxJuDByAoGVarYMM1C1toudmu4E9XA2gisfQ==","shasum":"2da133e7757ab9721a5a5bc1a5065474a1d1a5a0","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.12.tgz","fileCount":37,"unpackedSize":549188,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCgXvCRA9TVsSAnZWagAAp7gP/3PhNcRLy2fAIAVAEzEr\nQtXlpwRyEX7WQD3WEeI3juc3EIde1JWDZoHsoAdk9hHaweTSUs9VTt0mfsjw\nRoFsrBmbGM7Kj8hAzPsni/X4tnREOA3LnHd+YM6DdNxL7Tgb9wW5hazvZS2+\nPfQuekZ51X//eCB1tCdm9JPUgoTljXI+LCjBK5SsO4MUBH+RMQd5RPg8sNa6\nWnP54wiV49dUs8vgqFQYYkx+agpksWHO1HEvfCSvk2GeDx6SqoscqsppEvv8\nXkZmI3MFlEnmF17CFFM/9n1IcwpHoTL+DuL09b66smN4Z+g5LXbyior7KP1r\nxR99ZyLBDcvmNZaWcPNeYbkxg+y8cBN6ZomUAbi6yH3TJh2ihuu/I0Hh0XWW\nfeK/vNN5o3dnVRPj9hitXs/FTxQ6Mz6vY4NhZfxV09mQu3P2agu8O1EsWHFJ\n1QlN0vTmFVdxDQf1NouMteSnxSHZHOm6sZFdPcOslJqpmZWomPEcaUTtoono\ncEJl1Zi+hsp5u+sNrAzdGEYbvPH+QDOAeKUu7LoWc5aobcaA940oZTOEVmKE\nChUyw2k8M8MxKs6aFrpnDrwrwyyPcM6QuAodR6L4OkS2OZET4SnSc5IV3jjg\nazPYWD1CBwb6ERw/8lWKcJAfHgxQtnbGAG2OcslxnPFFCpcqEuX6zyzzeplS\nJfmB\r\n=6AB8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCM56Q7l9XMPsrnLxwzE29z2RVNYBYvC7JJtwbHLc4BtQIhAM/CNk1ovmn67TfMG/uLjywnrho0/D3rDPynj/l4kAKh"}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.12_1544160750914_0.8171349892031989"},"_hasShrinkwrap":false},"1.0.0-alpha.13":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.13","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.3"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.3"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"3d12544e078d74b5f0a59628eed72813366c4121","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.13","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-84STvHiSWGakQt23rV+HU8EMBilLMjM/f0LhWHloFjFM8g+KrtZ63tvdQACxIEkQ2nPqLJVJ15w6HuS29vPKtA==","shasum":"e0e63882b9e94b5531301b22aff723e517a0c8ef","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.13.tgz","fileCount":37,"unpackedSize":549370,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCg1SCRA9TVsSAnZWagAAvXwP/3d4C0mU7fMGWotk67IQ\ngM3N6uoH9+0YmWAWsHkKQqoe0y/ntLEUuyphEX/ovC3CoJQPk8aHP21MGkNr\nQUKesC7AyYZVE77v5iggWUlCWctomBbzNQIlPsxoUyXN6MHigTh6pMiVSaW1\n0CquwLuRypilU1bKuPqQyjPmNrqBUwZNCinrvFXKSpaOEX6SJk7OWtKLHW3S\nTnBDE1k/3L6jJLS0fcOo8BdBitj/h3+N1EPfSlkY+z3zHV+uQHRZAWZPVYqG\nMOC5Uv3VHFgUQ75YzT+8HIMF4fuPn7CJ+s/gDh0vWIJZQaB6gluH2ayPl3Wx\nBKot4bX3NMDmfzcBThmV4Cbvv6P+XmIO7Uofa4oCJfJgc4sAvjwcxTiiRYS4\nCzPBTj/mdHE+mptyIcsijijJ9TyMu0iH7Y+AlrtOezgVTPG+cxKyyocWLnpi\nLQkUz5dcuUEIgFot9CiGWi/bZNrWAuaDeW+C3zgjd3mDEGjqltYbWD9afxgG\nC35xzjmx/aTdYYOZvzl5NY9g6VULsGkcCvKZ4vUOCmG6elVQ7miURyhPaQLa\nY/QxdaDbXXUJ2uBkAp8O1loiX2IVWVluQeC9qQQFTtF5WUP6RNMmK+7Y+jNy\nliMSWmC8NzPQ0a0qlSf31j4xuroWPHSfvpHMr+jKJkgC5oDjGq+UbYv96Edb\n/Noy\r\n=UE0d\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC+Xo2Zmtb/VbURuAGxiZQdXGvLkAo5TQOJbK52QWnL4QIgIjGP2cFDC5xKUtJRO6R9fxqAQAe1WdrKjrkSvF+cVF8="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.13_1544162641444_0.7718667249974371"},"_hasShrinkwrap":false},"1.0.0-alpha.14":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.14","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.3"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.3"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"74502ced1d7dd68c5abaf89b2ab4b22ff33a8961","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.14","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-EmzoWVyB5fqPwDwjvY+it19cS02S8JPrg71jTSXR3YJcjoi1ArGzV6/uITRnpdC7Zqxn7Vv9vsw7RCSZgvgnJA==","shasum":"4e094437b269487f4ea0d070b9a9c93b9f8fdf28","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.14.tgz","fileCount":37,"unpackedSize":549412,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCg3vCRA9TVsSAnZWagAAWVcP/AisFfuvwhnLR5CqJpfY\njmKi6V1gv7Aj4CL2RRZYs7Uu9v4ed26DyKSSOGE74RrAxp4w/4ejuIDJoVDw\nhi6igFTERxsAt9lr4apCUc4oiSesL+d4buA9yeaZ+8cLx9a0/cx+tnNubDVS\nTlU9D0V42C3KdEZ1+eicRWkYznfX4Khxgqo4mRfG7+LtrgifIbZlyxCyhmYo\ns9oVo10+uX1aZB881R2JQBQYCvlPW5xLv8Vj5ogE3HmQ87wJcrt5mN8nFodG\nv4qKkwy9KG7H2vOKvCVCIGBhlw0Ye95hiHQrqyGQJVL7Az5E4oodQ+tIkSSn\nNON+nPm66xe4kBq+z30Ja4nTArTkIRu7kdaIh88jmUZq9DtA+x/9LGDEPBqI\nTSVy6D6LPhe/ZRJEAi3KKDKoS6gBoxjKRPr/QYxqIja+KlFyixijOeVtX091\nPQW8uuwq+vClf54BX5Y6o94phPcFgsoOImx+9IOMZEvIxK0tbyQdFG98Ub3a\nj1IyBULY9zXpCTvH+6OW8MkcKImlFwsctNGpEJ03Do/mZ/ctnnUINAoWSp7z\n5gQ9nF1AQNZXrWJm3rAqptSEG1KOK/rK4NYRvmq+ps9GQDgB6vmtjFfkLnHK\njKeODzHK4ZiVxOhQJ/wX7joz6JgaSgtniDRwwDqe0bFSYvklJm3ssMvwfiv9\no6QI\r\n=EU9z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDURZimNuPhh3lQah4fNjLA852ix3NLwaZ6HfeTAnb1iAIhAMpAKArojjc7dnUItrxjNHRdKfPEaCc3gqFAtRvqRBNj"}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.14_1544162799301_0.17259764193743243"},"_hasShrinkwrap":false},"1.0.0-alpha.15":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.15","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.3"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.3"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"ca9222ae107ce7ad3ef049300b0b278e0bccdd7b","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.15","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-IpoVW+M5ASAv7yiLsuU/ExI7XPi0qK4Hn9d4RTL9e0+xeD3JfuTcOSomjvBXvUjlykmdt9y0ummEnR69O/+8eg==","shasum":"9270d0a5054b5cbacf6aa390e2759abbfd27a86d","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.15.tgz","fileCount":37,"unpackedSize":549444,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCg6yCRA9TVsSAnZWagAAwBwP+QA1wTEJPgwMXp4Mwrqx\n1cxQqxF4pqMfEelJw7aNrsrvenucN34lR9T0Au7qmi/cz3IRTIdbBb6DFdi4\nE5Ao/tgc+0W+1ve3Qq/eIP9BiFojjqH7jkjWjoeBnT+A/GBrYu8UAzC6/6+b\nIXZcaNUFzHnM4VSLr9ueMNgbvSQh1f9D8VAnkgBf3hmD1F/K7rrHDfpnnLTI\nYKNyW/AgskiD7SIEo/6wGAIYAzKwc4VbK0AEuDU6L9obwSjlfCyRFlgAmMQz\nH6su7EKgLL6eFL7fHyGX8GDqlNC/AYhKwl3dG+bn536UsDjbrIepm4ctflNe\nM19XmV6QEmlR7kHM4CoIzX3Nv5EGtCgmgQiRT7O4vgLX40Qcm5gB7sirFD1E\nhPlga232hL6hNGFlnrS7LfUSXSmfE9KZnyQaA0gYPhGbb/ErVYjeCJhRgi2k\nrrgvdjdGR9BIBUFrdUE6cFQ4QybVxdX66+K69LN2JIC4Z/2mzfZa0i2oiGGy\nb5v24BKzta9YUfdmF6mHWVi9e7x6uhxcbxRUNbRB9z+YlxQMaiX7ooOuZdsP\nK+o4FSiiz/YQPfdj1qYMTMlu3JqR8H5NUhtArMIDhGqgspWMJlylngyacVNl\n3Li236+TisyRdOGWZiLKEQZS9CVK8J8A3/ga/c2R3UeXzoe/trqfc4FHGBzB\n8ulW\r\n=4V7r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDgS16ZlU9H93zq1ibcfG+8xYORZ633QmoIq63XeycQcAiAeoi6+jthpP6/X53rCMv8KjbgsjuS5Vkb9SdjBSlh9xQ=="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.15_1544162993788_0.07516230517434108"},"_hasShrinkwrap":false},"1.0.0-alpha.16":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.16","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.3"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.3"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"120f688846a8d0b21f027a9657d54923752543ee","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.16","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-zBluALhiTQHSUAQF33Bh7sta+15q31EnDaSt5cLqC5kNRVPyTO/+k5sKvZSV05Ao5SUsyMU212WdeakdYi6DLg==","shasum":"d0b699ac81e8424cfc8942426a19d281b28d7b15","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.16.tgz","fileCount":37,"unpackedSize":549622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcDY4+CRA9TVsSAnZWagAANVAP/AprAxVOZW4V+uMhx33E\nk429K1egsNzhzKftVqUAg/RMbIvPwEruoTsjnluRLvgqNqq9U0Y+1lyl90VC\nLrn4WOGMIJNckNL4v2VBOIJh7bE/b6vNOQQ3H0eXa/E96UnpyX0JuyhpkRUh\nxm20vaBGZ7OBd6zJMZknnuRZF0cBuH81UAS+vnDYPynoFJkYVGoXxOBBq2ws\n+HNAB4Undn9bJ9vlt6nAABTCe+5pI83hu+KaB+QQrMRDAbFFONlodhUSlh29\nN9k4x08QYhtwCdW/HTZNRJBXthEM6EZFBH5r8Wh1MfR2BbCcQxH7EwVKKRRZ\n2EwGFjkUk1jkjnEnP0j7USqC5Y4kwYaAkQCVNW5sXMaEY6SElHV95GdJur3R\nRtHkeyIbXFVX6ZeR66dUYCJa+7b5o20MF6Y4jPMNRZeB+Dm9nJrQ7uUZuREd\nn3KY0IfMqvl8lbyMVyA5l+DfJm02wHRwIJhzHwq8G7tZmU7Ff/zFCnBH84ad\nINTqkRaBOLrmVwgwBOihJY7WA68v1c2PN8So829coDwapgAaOvRxYiXxJZYv\nBr2X0iKCl4hJECte2oj8/c2WfUyQW8c+r5wAL8bRB029GyfDmc5Z7GKFOMYe\nAqtdYmEJvgyKKs48eUJx+nHft+kIRIBH9+etwVRp6LQ3TvRALxrzKgpina/0\nXO9H\r\n=M5yb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDpXdOUZ/TJv70XCKgWI/myajUWaIciwLBYcHIJNyB5sQIhAK7b9Svd5fP1zGfMmD5LjfgYovQta4n3/jLYqQkqQ0BL"}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.16_1544392253523_0.15708052647495907"},"_hasShrinkwrap":false},"1.0.0-alpha.17":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.17","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.3"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.3"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"120f688846a8d0b21f027a9657d54923752543ee","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.17","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-ZxrlqmZRydSc1SRrqYDc2T185I5PeQ+GMQvlwbGJN8xbYo4ZV7zlaSetxT65Gm/8dT33Mys9XwPOa5EjAT87NA==","shasum":"8e47acbae7771b6e8b530be256ce0948e8f90be1","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.17.tgz","fileCount":37,"unpackedSize":549875,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcDY5XCRA9TVsSAnZWagAAB48P/3I7wNHtf3ED7qWILvZY\n7aRZzLob25A4+K8IVSa508bwVIvv1cGn0GtBBh3KB5PySMJzXoreGGSMMFP0\niXW/4HpENndMin2f4vUQxc3A5XdpCM+JPEEHt1D4g8BY6IfQtlWeE6XO0puj\nc7YIRfK/y+wN28ocuUEAEHjbPachScj7QZISz8ldK+amfz5DIFEGP+GNBMJ/\nbybg6TDc4BTGDmLCZMsxpXKv86JWQxnLyeQ1u2H5sfRPRyNWrF7t9Wk2Z82S\neZTLrNkNHoMa3TVR0YtUq47ni+lZE/iShnuWOxHuuN9oQCdqGARrAbK1ftaq\n2/uXUVukQY+bJwJjvKr05Gu37k6udfNR6SH839pWhtgmY24ipWZ2RodUjVSC\n4T8noYmSixGaALknyOH0M1PmDividGb6ydl1a0JDt9uX8DtdsnrnSEDD1SLc\nkmUJy93ihCMTOF2e+D9l0cf07bGTt9dIb4cgbfdSPLviRXQFoCxzpQiKPkXb\nMdpNcIja6RyY1tOEU0S4gFbWdtK3obU/vmhsoK0f9lC10zPdoi53h1ErVFLN\nRufQXcCQpE0ug1h+OGf3+ZA1FTmJRVObRUo+jDhhum+s8aIbsoPbYwQ65w9d\nOnPCI4pgkr7wSYZZTiuLkg1o2JaKVaWofo1PeTR8NedP6Cw2iB1UoqS3vj38\nIZS1\r\n=x67b\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHuspTPOFYTpT3BuSichjolnepwCOGMBVCaDJpQmZPo/AiEApIt9r7SlPcHM6eJdbFGle8Hr5KZEBQ9CMTWDBGpwQQI="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.17_1544392278913_0.46404341080210787"},"_hasShrinkwrap":false},"1.0.0-alpha.19":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.19","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.3"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.3"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"120f688846a8d0b21f027a9657d54923752543ee","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.19","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-He3Hc5ALNVU0N1A3X/O3VfLiMyJbvSGtDAYxIlQ5pixXVs3fUM+y8Imbcs5RlUDrbPismbwQY4z5x35kMMgrww==","shasum":"ce0b6621fa501bdb9efb3b76d7248f544295e7c4","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.19.tgz","fileCount":37,"unpackedSize":551201,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcDZk+CRA9TVsSAnZWagAA25gQAJu0dYrNQiZ6jGJkzF/u\nh2BluirZAq7LuCZ2fCYma3s8BpZHQTvrkiTMy4XGzK9x1kGOrUFvQR1qrZhY\nJ5bkQb1v9RfXyME7UmpW2vySI0hFz2YhyYOYQ4REnMNgjizdnUTxPtP12Pi9\nABhxMfBLMnEtKWUTSREuXhGIUCDOZem7g0bposWo5areTemmjP3mDDagl/vQ\ntdkVsAJqQA0LHA5Qtxt4XcQ6cGDK5TrasJckLX8hzG2jt9uL2VwFG/GrcSyg\nf/9V989M46rZyvuNh7WolkGCs3HU8+l2gE0NI9DrX9v+j2beTliXgFSZTFes\noRxyNa6iml5ztE1GzWv9lzVPslyvP8vnweWBkEtitKgDpxKkqiamy4gKihUG\nMxT9h1QBvKN92grpHFKEctc/I/Kl/Q2tM9gQkNGnVJ2i9Y67H57IO7e85Gic\nj98vLJR+Jnp4guMjZK/F69/W1vXr4yFjNPVx4oI0QriULUpIuPKG59s/Y3ah\nHKBmA9z5ABYPB+tGjCA52kchPkHGH7/tJ/IT2ufbe3t+bP4iyYhD6K8M+dND\nZ0aDsilG3s8OTi2D1iFT15lKQxuqB6WJgeL+9gAsau8AOxSze+8TUNFVPcmY\n1mEUlqGd1ul19/YocjgbulavKu/2aoGPb8pA8omipZExjlTH830vczJ5oEvT\nssE/\r\n=IfCr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDOuZDLhDfqUKx8L2y3ha95d1MMg5n/fvU2uOmPpxPMfQIhAPH+J0HfJQcvFU6rsiNBnwIEdLTr8b2zwO+nM13Xi0/8"}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.19_1544395070015_0.795227814400862"},"_hasShrinkwrap":false},"1.0.0-alpha.20":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.20","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.3"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.3"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"984eb1f8310b23dce6867d75ca2bcdd278a0ee16","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.20","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-ABKOyjTl2KYQMnMbLRF6FDu8l2KOlkWxYYQF4r1sBHKboW3Zd19Pc53fVhnxBfnYAEhKCBsdiS5stoDdPws2Ew==","shasum":"2cc5d4e80f8eb2338bcb293a5abf7b6a772c43bb","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.20.tgz","fileCount":37,"unpackedSize":551273,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcDZs4CRA9TVsSAnZWagAAmH0P/1Nw/nI8MJ9snydrBEyn\nokC8zep9gRt9RBpcKCeQfyAj1JlNes2yalBysribWw1Jux9lVR8QUJfnZ1hU\nbvV1gteFqByY/HjPKz6Yi7HEz/6S3f5Bp1LQg5+iDM8layYYbn14r3sHlLl1\nmuKPHij3KDnNHJPM5O8JzmcKAEzO3I3gWW7hysntk0LayJ3w95eV2W+YhD8k\n3NwKeEbFiGvz2xNM+EAEID3IuoX3yP08iEOdFL2oeEgRYZ8ZsIT84+12yfXG\nbnLSU6RjdJUp/tWiskEkYaKkVMbHP9XiHD8sdAImueoz03RidZKyOHpXJoVU\nM2uFOZdNE3XLMJ/jEHpdhFAtT1lWIBUbXlCbOihueSNXmjnU83zGH0SHH5C6\nzd0neUSRUExI4un5/uqKK4t0iUAtp9+30b3Gr2F9bxbQmcndaAWUXe0F0zkI\neK2Ag3R41bOJEU5t+pLqtkuVu1il5/VSmI6saeqLbcIf2MabLqx/oUz/1WLW\n/zRtjneiQEd5ikcBLkDSCVGIDre+7upMJimoif6udlFJlsmriqBDq96u88/b\nr0TcJSO7AyKlCrpQ73bAC4Zl2X2X+9XSJ5JQcoW30ghJS28uuAvR3dQ8lXrf\nuAf8V1A+pd+Thoyvz7y4pybzx/p3mQh0rzKvxYcNqxLS2VJUhZ/U9PqQJFtw\n0LUD\r\n=o7a+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDJrwnN7M/ZI4DFPNARo68rH/W5bW4FxgjDm6tkf7vxpAIhAKKDM8zNAdzI5I4+cHJsHe4FIRkBYMlwJm5u/5VLRj1G"}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.20_1544395575501_0.9352224915571847"},"_hasShrinkwrap":false},"1.0.0-alpha.21":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.21","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.3"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.3"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"1b17742e4f24013cb2006c2878983002cc3d62f9","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.21","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-ITc7gXhgSAoFGMUSrFlQAW88K+qNi9aSnNM1f2LHEdBv4CzxLKQWJCRcePiGtFzSXh2yij1tXC6XvHJLJSL2+g==","shasum":"40665461ce0e18544b33cd106ab5520676389418","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.21.tgz","fileCount":37,"unpackedSize":551267,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcDZwuCRA9TVsSAnZWagAAJQcQAKAArjoT4PG+sF9couYm\nhKJ1ceQ3I7l8m1X9V4Urf0WNoKjstIWEcJtjS9kMA01C31a3oKppbgnshoFu\n5zxHs8SpWiKqmxzoFxxLmZe3b3FMZ1sye4fyVrNHlL9iH2cGbZYRi6Zoahxb\nEyMAaVe5FtIaB4gfsU7ZCu/D954/stngYoZhjO3rzuGNQxg+JF6DeYpnxYd7\nIFm+iQhy7zNMMlbsTxLqhE+ia2UDxy8he19OhJBAjpbLqVd0oEvvoOLNhdtd\nD4e2r8uROJksDYPbxggCLki+4NE3HQJVq/qkrbr9kbcBCWhxJi8h09qDeXSr\nI/Ht1NDGL4bZeBuDgvrIhyAJyuqFUM6abZo8Ffw37lXAMba+ajcT3YJO0r1f\nXx04Qrv39ASVA6Jif5zcC7n4ypZ9XdlW+ATejooevgbrfjiQtf0kdafj5koB\nOEj2pIlA4Yza01ORfWRlVf29c6BQNu2j4o2xWlO8nC42SMhg38OfEB2Dwi3x\nc7nbkZr9AaNhXhLMTuJvwajzwhST17nBMe+eHSQXW6peQzc6tpPWladUGWqD\nBAp0+tQ0BQ3Wt4MmOJAMq7CL1RJDj/8bFqqkb35eWlv3C6jEjuK6A6hRLkLP\npYwposEwprmR3U0+CkwjWpfjQanUmmOAxeeIR+EzwwKlcT7lRSgKEu9HYEJw\n/9aP\r\n=NZz0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFiss+3RzXC0C2UQ/CTCdej9+b6ntJH5mrc1BK2shb3qAiEA5icDaD7GrLqHq7Q/vufC3xB2HBmPmR+FViaJe7UozTI="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.21_1544395821334_0.4130239469764583"},"_hasShrinkwrap":false},"1.0.0-alpha.22":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.22","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.3"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.3"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"4a6e9911b8f5aa8fb5997faa12e278017d39c6b0","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.22","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-GqpVCKSBQZ9VRPV45wfUGkpqmEDbtZfO6ABLFjhcjwQhsXIYrJOIqDR+RSffuu0Kwa8nOu0qUV855ptq+EMing==","shasum":"4bbbd86fe81c3787b4d38498a10b403c948912ec","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.22.tgz","fileCount":37,"unpackedSize":551227,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcDZ1tCRA9TVsSAnZWagAAF+IP/0ZHKWs7g+j4/jKvgcsF\nFqND2zzTDmaIVvAX5qilK/J8A+honJiFZ57xA5h8WHxKqAt63WCtBvHFPIR1\nTuLU9egR8ki4V3E9oG8yLdM2Dt5doPssxelJLEfC+X9HQ+005whnVYTkeFZ8\nr+dEEVIXNHOoqLFKR92FO0Fnw/M4wM78qJ0xRHWfpq99PMD63amNYwtysJZM\nSf7e3jF6DO62MnPqRCMfffUKSyDt9HtCNPDxUDdWw2hgOwWGS+RIlGzgf+FE\nTfH2jPs2gL7GVpWAuSdfsKk/PCgc9Gx8J/T2qMZCKIRGJFZAzq9FiBLwDKYz\ni9P2k4f1fbBipVgYK+gn01CKysfHNd/38meL9yvB6iEi20MT88paoJ4BMNh5\n5mKDGvP9tiisPhTkZNrYEi+D3d8ec+GNQeT69n9jTAsoNgC+vifCiOji8iq8\n9JcQYTmF1nt4uKVVQtAwC5OFIDEsMWtpGWamGPva7jh+ub7UnDORQAXz5AA4\nYsxq/l55NEXBC9C80JsFL/pHVO5OY4tVzjVu4CkuWj03EZkxO6Zks5fKtw63\nsSOe7Y2qQsjPLb2uzUxbpqu80zeIvK9nuBmuFmhAAUQCqa15g6VGOOpYf4me\ntLvAiXSEetasVFng5KRfBHYloNn3CVMO2gIh6yaO7ZI5rOwK8SyyH7twjw+T\nsLt2\r\n=hjo0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDh+mtSBRDocXIuT43s7NOZaJCwD1fOWne0PlD4OjOr6QIgQ9MUjEQTRoH1TC+djA8gOMNMjTa1u2WXaEq7a0zN5ew="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.22_1544396141165_0.5047710139580144"},"_hasShrinkwrap":false},"1.0.0-alpha.23":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.23","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.3"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.3"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"a6ca2c01d98841b0c1e43835d255c1b533aac964","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.23","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-AWkAYjg12yLJE1/tP9nsb4xm+q1vS6w8OxQdJmas13Cn/JIa82Dq/bAtcgCgfNWHQjnpNx5akvcPtNLZdTjh5A==","shasum":"14a045783c8e08bea5b6df351b8a6d49f84414f6","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.23.tgz","fileCount":37,"unpackedSize":551410,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcDZ/OCRA9TVsSAnZWagAAtjoP/A+gt1EF9Fnjq6K/tifL\niCoHxuzhPNCkBKd3somTp3agoZ6x7X2XsIeRzunVkiPbMeBelIWZW7BuGGM/\ndNYvYZHBxeBdktRyuyl9RzQagQ1juSzqpFUjZpI2FiwRGbCtGQsuGbSB3J2c\nnqsgnOrnl0h5pTdwlWj1HqyeMk2yJsQuzk1UIwYjT6g3ZIMN8ObAuFIO514d\nR0lNm6C/vjwgwFihULoPGZxLxRjWN8kAg6VRkrqvlKTA2M9l3Tv7r/h4ksSE\nNTNNBFQ9Ku0FZVX0ALmp63kwwNY90W3dglM78CFbwcJ0ycCrGtYOpWhu9bI4\n83zEOJpNvc6iW0ZqqR5FJUYOopIAy7rnE33BjwcybzXIll3WdyPmpyxfcOSj\nIX+iweMTZ0NBVmg5q8sO5qRQTWVETXPBtjjo3CawXu863Ta4reVq36+FNKWp\njyRVC5retlJqdvVkCPD3tHvEGYtaTGyiFBena3myE/OC7nq5r6o+RYbh7rya\nITFIInyCqtmGXxUBhuDkI+b7AYaTiTIHmxyLYkA9c4MV+WecD0SmGqrsa+6F\nrIud1SB/cn8KB2SLjThTAVi/0JbJ9MWgLeQu0j0gUNt/TpsokMWqfQY5baeS\nf80zy2r169iNu5gLaTXlFgrAvpw2z9R3ITf8JHZoEZLucMz1n09h0CXSYmE8\n3W6y\r\n=8ja1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDo23h6/0Jrn5aALCyniJ/ZKpy7Kr5i9bW/OvKvGDl0pQIgRSetahl6ur0osVPsxKe0KngoubVsX5dk91lcO+WOIxw="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.23_1544396749797_0.9699798262693786"},"_hasShrinkwrap":false},"1.0.0-alpha.24":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.24","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.4"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.4"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"6ebe369cc214bca7bc2069a6172207f760eb10d1","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.24","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-EscWvO9V4J7cYDFLTwXUvfmFZMhelv8K9nNSrfeo08p/gwK6vBSiZGnd1Iw9GDDiWFeYpaJYZElTKEOv1PJ6Eg==","shasum":"13ef2c9eee44112f30fe1f051e946f174bfb2948","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.24.tgz","fileCount":37,"unpackedSize":552642,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcDcS0CRA9TVsSAnZWagAA8MUQAJsW9p6JGgvkXE1H1WiM\n6VcCAf0N3fXQR/g/um50/i/PeGbwKe7SkHnC/0D/7PTym+33pj4w4Nfays/r\ntiDsR+UIsflXWGQTpXZpVc4ty+Z8UgiTAR8owe2SJbpJjvlxleIUK4Q+6xYH\ntPWEHKe3y4ejYB2p/t+j0hLFNnY3JeF9QuWj2hazx10LjBUt5gZWZbA6sXRe\n4MnULQXzhpQyRNRePqYfyaCN0QNP7FBPLTYlGaHTpdMq9YYyIdAz6nzaBYvh\nL5tHRtUEF/EhvuX802u9u9YACRWTmBESJe1a+g8P/DZ6Xf9Mz29rOhP4lNRx\nF/oL+PYc6Icx/z55Ptc2fOikVR7s0naw+0TsqzcmwXsC+/Narx9Bc2FsT1aK\nvVj2eUu54geUM37s3ehFRbtwXQIk2tlQPsq6G4WMdC0dVC+GTwVh3jjv0Am3\nCVkJSh5xPcg1Fw9qDdLmqJLT2jMQW9RdMrhZaqeJRXYl1VREmZVauZ3p5+s8\nqNWDkU2cesLBK56ezctigkQVJn53e1gRefCFXrka9hsGIbHyvEVbGwPSzlal\ni7f+uZPwwx1mpk/HRM1ZJmzZz65mGPsw2XphxLLNXtCzWF4nw3EhhAoWiAKp\n/vW8+MR1EAxiDihgmy7BBgz3eiZ/jY8fDSGgNN5sGoxQXDichfi6lr+erHQr\nFstW\r\n=JXSr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCOublAbJWNIOnMmvf83J/mT78HoAZ8tyXvNy1N4S14egIhANJqkhrHIehBArUnMqRwPXB+SgtnW2NsAk0reOMHl39Q"}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.24_1544406195816_0.40888701242552306"},"_hasShrinkwrap":false},"1.0.0-alpha.25":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.25","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.4"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.4"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"d786a20d3f6e8072143c01afe7b38b2ae0c571ea","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.25","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-6LUNkXDSDdit89fzZREjdBsYtFQpnqspVbDqONKUXsKlMV8Je+0KTGZxGBfMD1Lg6N+ATai8rtxt5T6tcOjRnA==","shasum":"fd4204125d47898578603a1e0edc1f9825353887","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.25.tgz","fileCount":37,"unpackedSize":552682,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcDcmuCRA9TVsSAnZWagAAJkcQAI4WoDZAftSS/SSiPcGJ\n2JvdEWk4rYmg2+T2OYSv6i2Ee29gR0e2ZUkL9gclOlXsdNFR2//F0T6hlvn+\nB3P4JrmRjFIo4jwa5HAlnzEdRxDw2vMm8Mo1Ngl5tzL8Og7VUg0/q/NYkz5p\njqlzgNWeNZc6Qa6M72ndPYqYPhbYqs6yaH1lujKWJPACZziLRyc4Go8AkQmH\nlB3IG0JEpYjqgmuPniFbvCZnvhKtw0rTz8wEWZyRLr9xjgMLSjHXOJr5EZ8O\nrcVCyGAKGuzgXZL+nXdnx7mflpkI6nIdZ0rwrspyKhHIuh1I/msURoHw2Oor\nrM04NlpSZTZUTp3CYwEaB5WVQoJza/pANeKSE3cIh2ufOH47wjG4kfYyLMw4\nd0d2DwRMfNnHzq9fxzh6fUX99tvMyxA6i2bIZ91o4GqYCQxKpoonwwEb5P7/\n7xIW8A/pT0XsJwLYjzsHJltqWDWgR2OGIDOPSwUtevvHSDVea5AkRzk5x2ru\naC4essmCaqJT/m6SptBviP4IMsocN8bjP4r4Crstgv1AXZn1LLtxpAr6iMa1\nd8YvG8HkkcoAaaQrh7wAKmAWyYdFfgi2GE/6tJY2AwClwnz1yX8wI3pKGLF4\nvwo7uZnM97XTtzxvJYRIBGg8lFYmy1pUyIJWvd+hCSZ4kRXZVFwCFH/sglDR\nZGuU\r\n=1/Nv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDW4e16RTa3ushPHspzo8AykpgpolNfDU653KeRnVx2TAIgWIF8Nwjs2Fo14jPci+IkdGEVGcTDuDYofPFC7YMkIas="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.25_1544407469428_0.7457190859535505"},"_hasShrinkwrap":false},"1.0.0-alpha.26":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.26","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.4"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.4"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"52113ee450b8940a791221bf60b4c4a496bcbd4e","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.26","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-/gVlaU6NT70XCRxyYnEWC82NdAuGWSXBEwuHlcpQzOSbdQSvbaJ6hl3oO/Egsl+EALC97Oc+HaICB/vrI92pgg==","shasum":"d80cb6cd4eba08eeeb53bcca5e4e6002f42ca37f","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.26.tgz","fileCount":37,"unpackedSize":552722,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcDcp5CRA9TVsSAnZWagAAfd8P+wYcUNbuR5XwV4ooYWbH\nXCK/g+cwbph4Gtj0ek5lxykpD+QY4tHfLoBLPoNhUgZKa5ykTe7XtPrHPddu\nYQbo+dkMs58JMmsNq7hd+3Q4ZFjks7Yn4W5BP9wf6tpJU8dfwL3qwRk7ZF9Y\n9bu5YG4tdzo3ABiwsQd5z/k2kYSMeOXDG7qoeS53NywtyfqpPtQGvZIWLvHA\nZU8lftdBMQbJEEMQYxm8ReDhXzKrnzKHO5YyFArMOv2+MdFVmU6dhLy2l5le\nV9YT6LWVfg5R6man7DyrNRzA3tAXV2+gpTu9w4HhwuOT6mvhb7b7Us0LcRd2\nms9BP3xqblFnyl1oePFR4kNbs74DjI6GPayFHT5SGgLdaGuRBrSQ1OZNcFzi\nTRIbZ5oFdEgM9fcmDBL8OrBbUoN6pin0qM5oHYnOtJMDSBtRsskcPkqz015g\nG54Y6JXjMlNh8rTXtgE4IyrgxmmXv3X1lqqRAp37L/vq9oSodXIvhisdDB04\n5a8NheOKs5IOsKyUhbPpUmQIo+yqp02QMjd9okFtOtvR1etDOe/N793eKes+\n2lIP4hUuco8Lu/VcDqP7dqWur3w/0ixFsbI/j/tj1CoqRBXaVxzul/y+HWMl\nO+Mir3J8MCOfXvlb7zsKSiTv0qisQ8x/6jEk95IvEQUzAZlhEVpJlCo3NXmE\n68Tk\r\n=jZ8q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCA9DomhiP4XL9TRtCBIKiXVfnAEvtmfi0BKiCEqtrWnwIhAPwJQvC88LXjHrocnmbRyAtyilv8mgVitqa7X3gaXDei"}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.26_1544407672649_0.5528743114499055"},"_hasShrinkwrap":false},"1.0.0-alpha.27":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.27","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.4"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.4"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"9b3a3efc26770c8c58f550b36f90e815c28a1bc0","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.27","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-rFnY0KoQpygiU47WyPXx5TlZLZagCg9oz1+iJ5cmYmqGy9YWVtY7h+xlwlsnnccYt+QtxDtwrwRYlvHkHLhJRQ==","shasum":"0aa6e4446f100c8128b4b259d7336a51e0f33ce1","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.27.tgz","fileCount":37,"unpackedSize":552658,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcDfMoCRA9TVsSAnZWagAAno0P/3my7xsSv00Ge97a46Ap\neex+jjrkUft6h89fgZoXcp7xqZN4EBojYmtjcJzIfisf7DXJxWRyNSrcaTTX\nuR+5xeGMmhiJqaCWiGrOE7Gysz5fcgQWCeN8uYivC8ST6lZko9JznTfEW2ti\nF/5+/j8j3ZTlmjG15L+XOAu1IbWXFlXe1XC7ayY7gfrsvk08c7NvmdP0O/dM\nHCIrjr53e3hXH/Zj7B2HPjMNabJDnUJZASAccd1JEbpp98N5xWfLMEilCbF1\nudvs592C9Ogcj8MjdCSmLSQ5BkdYm8ecjXiwpk57FBGNmyAk6WzUxX7ShsOQ\n0L+4b3DtkMtPsCpOEAT5Pl8a0faniIps70KVBYhK0+X/wj4oyxlF2xATSFoL\nmU+QGEe8gFG2qpDuv7kKyQsMtBEDFqsvwtZfKmNkao0+v7plqwtsmtaQVq/D\naErIbHw0fraZL/e7YUXOaptgVQ4W9RAbiw2Z4lpbV8VgHNX6vN8ho8RZar97\n4ZEuQ0J40f+OwkvwT5kI928qjfB1ysnqWcX6a9YrAUQq/HjthbqFYTdEvdpp\nGQIk/RB1JbrO6N7I+0OS7zOKd6dAxn6A7vR6lHZUHXPNTksJ62i4zSNIaZaq\nCSLtJd0pqOa9y0PgVSdgg5PpW/ktDr+20IwF2J5lpv5nELE+4EB9gY6NhLsk\npVKA\r\n=vavm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCwFIfqku07fkQOksBPGXr4TCjqsfhT+7IFkDsdK+iBEgIgUMx7TflUdlc5xHu/UD3xmMV56HXy+Le26rnVzGelZ40="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.27_1544418087326_0.5402015470792736"},"_hasShrinkwrap":false},"1.0.0-alpha.28":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.28","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.4"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.4"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"56f0b9583d3bb76a00194102dd66a7fc5f9cc80f","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.28","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-P37BU1VheS+kFnBGviBybe5eCKFA37OGuA2Oh585lZS5t0NPyQN2qDqG2PvpOJzKNoA4eTMFrWsTuPBWIShpfA==","shasum":"90740b122abe29d9b8df562906c270320a1acafa","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.28.tgz","fileCount":37,"unpackedSize":553833,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcDfibCRA9TVsSAnZWagAASi4P/3s10VkUoN6iHWuCNqRA\nDgICUSl6/niJtZ05D4GmUAMaOQcEsPAtFCCyKLvyySpARIYi8me5t9pUdo/0\njND2WweVyth0WKnjtHhFO5UBsD89A1bbLCigW7Y781H/D3BtUGfmHhye8ao7\n7oLP50HALQUHaQ+K/cjgg7mxQxz/OqRdZcHuBUpMFh7/Cy8RVWQB7OFt3gy8\npr0/ZuhXqdSUSX7r9vYvl4ZA6T8S9SDzvWeuAbw38Gq9qFNjWZkdfK3Ksq/C\ng5WvrmVv+pMRyc1kU/4hOn0VqnKK1fZZiMxDIrnUzKivd1zeiWEYr0y4hkeD\nn8oclO1Bbhm8xV94tYIgcQU4+3QiUWesC7ZzYTkFnh47jeCPwl0K/uGzEL9W\nqoquTZYg2brzTu2rCEG+RlJ11vPb6gzAAyGhsw5Owo8zifevvIEO4dVOtAni\nzmd0cJe3AWQ35m+FdvwxB9OtGM0zkm8Bq2tJ9d+zPqtY4mR1Ms64BvjymMSR\nuHxDAncxlsGMPYKcD+Us3Kqo1cAHFYf3uIsp5QcT6J5i5YpDPcs96C32RIj4\nlarWQqtEdLo8MeZYvZHqiD9vxdujcJLbmFRjLxHK7Txz9fDY/QiITwNlug18\nW6RCsKM+NIhvliRi8dghBjMQ15ROf3zIqjS5tRWEGk43VQOKVjVXqsisuuoI\nyfEf\r\n=NXQB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICOjkN+LnkKsPlw0fzTIo2vR5mxIJ4x/hOaC9M9hwI9VAiEArFl8ySphdb1cOZcVtpnK6ABYfcMejTeyAcTQ19FkvfM="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.28_1544419483203_0.6062839515755412"},"_hasShrinkwrap":false},"1.0.0-alpha.29":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.29","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.4"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.4"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"7051a680bbde11074d38dad31f647178802ef7bd","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.29","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-LZysBkeITC2kNr1JdwkXASmBK44Nw/46VCntKDnlIkk9NqsbWMmGxHFy1o+SAahVnx5d9Q2ARN8yYPFDu8Z7og==","shasum":"b07eaf6e86c3fd593960c85261dafa7061270728","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.29.tgz","fileCount":37,"unpackedSize":553922,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcDflVCRA9TVsSAnZWagAAXCYQAI3RdVAIWONaXHXdPPFa\n+Ohm6QYapNZeVPGl/N4g3xY/Vs3eyV07YP/kvqTR0t4Dy4BIHH3lOZDWNC/3\noN7auV325Dj+mSjUlgJkx2PcdkG/Amnc+G9jV9gcybJcj5qcA4vAUyoifkgv\nAerTss9Os/WtsJ4y64onl8ggCV9/ZQ5m0zrDU71jyY+UChOCbe+KtQ+uZGck\n8z4HwnLfQGzi77xKQf/mM+PpZ9PSZYsbLjN6ueIaIk22LwZ68VQUx+b0bWJQ\nfrzGqMy57G9xiK4cWGSsVJu4rYNw8Q9d/fAnvUvU6PIHpiiSt4Vik4tLnYEn\ncVcqiGIS8UQC8YmJ+BtNyY/e2dOp/LNqvWqBP/KtyRMYr6jnu7WdxVnKqcoD\n0hhNUWBNy84BPOCtuwFGJrIxKGCW35j917COexFWBZpniACMvMCcfeRoEgKs\n5bASnD+HH2S95ASS5DKm0PztrubKuc1hIDFb7Ro7BAxkggEfb2XQlDep5+08\nMxF21EjDOToisKnpNgEY0oXSrGGeVzfMgUuNv3mE4b3nhVHf2HO6ZEsbE3s+\niFI51BtvRlLqOKOt17vARKm9TxjoeaRGTsBDIw5ami2u1CAyykbeg/0JKOib\npraan/p90QmUtRFrhzmgBN7mF83Pkm7KmBgkca0ETIzf9FdzsulSrYRQcQPF\nYTjQ\r\n=QflY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGSsnoWLj27p8gRWKe2T2gRvqx4tPg2qyIcgPnq1ZXbaAiEAgErBfZfspHGiQgEmk6fXwmZ24/IJRTGz7KZtG0nL/Y4="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.29_1544419669079_0.8821942889740457"},"_hasShrinkwrap":false},"1.0.0-alpha.30":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.30","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.4"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.4"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"c39fa52628dbc6d6ed04e398e4f216217e038fca","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.30","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-+AndKLisO2MCErm5J8cMCeQlx7FvWkJa226yVyCoO6LjhczxTPpRi+lmxB+oW8gQFS2cMpFErNP+2efIhNUhrA==","shasum":"ac6c82e2218432346d1337084031627f563ee8ce","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.30.tgz","fileCount":38,"unpackedSize":555356,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcD0NVCRA9TVsSAnZWagAApGkP/1ot1UBw0ARbL2KE9tMd\nH5O7LlBDK1n2NAUkTqQPMLS1mQfA0QsxnxGEhP8DnPlqsi7HHS5ArsoyZWTH\n+jJcfe6pn9FpcqnhU6TaSU7w219kk3MnvsGDFWwUYFcBGGm4roPrqPDRZgXk\nXAwjKJcNTv7WKPckSRnE4aBhLdSIfhAClbCixkfpTI5iarANwzdZTF2exoch\nlhkbgbpynTfmedeyXzi4+gpmN6OpcLNhBpRVaUKnQeQk9CFQplFx9SrM1u3n\nm3i0Ovja06c6OcAQDbnrfIkVmgTa5YtZKwrNqSiJ5R204UjUi3aS9h4NYf07\nb/JoY0I2fXrKSB5Vq+juxDqtTXV+BoGBlOKCicNIm4sZM1Sm0ejEbKiG9+ic\nu9X533/R07AwdqwWOrGU9mSqCYq5bvo2OfGk0lMbNSDh4+nGpQiwEBo+FD6A\nPveZnv0sRDKgvfePi6wXMYpW75m5rr53Ui7sSZVboJ4vCsfRUVTx5Xry8Ni6\n0DF275ESaltpwH6wBKXshQQ50baKq/Ep5QUql8OeaDz7L9EtrlmRBBBCbW5B\n29Cxb9V0Y8V1wDE9pcYRo3SmIruw1xI38m+eLFfhWfRz5DQp2H3FQ4jUeGQK\nryRbf/1ebxdxuQT4MHnIZxPoB0aHuFpwfeu4v9kWJa3L7qSY3B/hINOOD54G\nmSzg\r\n=DZUo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBTcU0PlV09ET1LjzXzWuhYOXygTThPgpSh1y+1FToU6AiEA4/xTGOk8+mIq0XJqfcDRhiiOnT0RbFtAJa7mxw1B1PQ="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.30_1544504148570_0.1445954070417408"},"_hasShrinkwrap":false},"1.0.0-alpha.31":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.31","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.4"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.4"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"98707ad271e3fb52f726d274f451ae588cb06d43","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.31","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-98Ym3hbvUE6mGK+gSy86/sWB7RVCeRM+uIW2qQjltCfsbqmaWqZ/xjP7XLoGDuheMVh/4NAughI1kMtvoD1x4w==","shasum":"4051666c434ddd0eb53d7dbe82ed46b43da09c22","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.31.tgz","fileCount":38,"unpackedSize":556191,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcNpBKCRA9TVsSAnZWagAAbxkP/Aukge6oqlaS2yR4RG+E\nB8hMP9G/n8I2OO6sa5lQd81+26TyusJjyBkJR7JzM4iAtQp4l8wiIPfxRGfs\nSR0TqG5uYKETfkBb+VDFlqqd1ElS2g8Hf/TEZfmuyMgE11H8z2mgdjZu4UXa\nb/wtIccUftCCExPgN24WAaDb+hi7c4+P1xJ2zCZZy6+1kqXsrIPPDu/47bv6\nRh7EYa107Emm2ohkCDn01DcJr5IGayjXKkz7H9k4DEhlfxJMU2VmvVoihFhq\naajjkiFR3pVy6NTbzAthuL7Kjac3iUlph9t0Ymov4w10VCd8VIG81K8EOwlX\nF5Q38ofIfvkP3fWgnEyNFCkeKHQbkwpCQby6g8mT1c03qPhR5mkWGGV9Q7+F\nRMYtohnKVltFR+LWVpIuEDwipAocP/30X90Ghw8ZjNexr3j6+qRFnHthYbS/\nWFgzwEWxibczhp+cFvPu2NtXXJr6ddV6c+GACXQ+ktHdyiuS5DHO612ZtbJQ\n/WCeM/125YPGtr3O03Q7RSEH4Ic5lkt4bYO3kvbMnj6kYwBeuKKGw+EFNyJf\nDk5aCjAENu6vejK62delJFDzwdo8RQdZSIvn7lI+++jrCyeDZyqFU6Hx2GAK\naLIAPYXNaIcaPu3EWlI+j6dWz592p2W9tU0i43IVmpj13wuXeJQect9lucgh\njhNt\r\n=HPmR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGRPJeqk+pwuuQrH4I7BqLuLd0jLMzNTp/GsOQylOLgeAiEA0f5hcO8LAqT5u742IkJl+IWTF863GxLXlM9y88UDxQI="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.31_1547079753826_0.25217904227045596"},"_hasShrinkwrap":false},"1.0.0-alpha.32":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.32","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.4"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.4"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"f982058ea90e8a8785c7e676fd1c7071e40c1098","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.32","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-tmPAWoblhfzu/iTGqeu7SdCCi3Pt2ldXfUu736wXHAb/cS6gWHAh+N+Jiqs4P9tXZP3KfjhzdTiqSVTbYkVKFA==","shasum":"11d4755d54234153d72d667bd2114e5e7f64a7f0","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.32.tgz","fileCount":38,"unpackedSize":556267,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcNrD8CRA9TVsSAnZWagAACmEQAJrsjAG/N2EYp+iRJgw8\nZYh3FdT52f9+FPwIggYXW+lKF6AshI+enIIjzHHzP1ANrWYFzXPgdYm1u+wt\niQ0C3CBuzRJqGN2iyjW/7/O3TeLUncXG134ZsxKH80SO7SbsTmRxCQS7hxyJ\nZRgp/zH8iTprui7Ca7nfrTOLmom5qPseojBhhihjrIC60IJ7vD85oUstXRbq\n39mJy+13QVLyg1ivRI6RYdFtJyDyo4JwsVXURiy7VHwG1heu5VCaXvXp2YAp\nKBdiQTgN1av5LCrsEMlzZ4yuyNiFmReeuDpJWoTsSAyrmyTqpPTQ8NO63Wkd\nmBKpZW31pHuXxiYOXqolpDYmlvRdD56kGzNow3rWcCSeMFM1e56swROzFUhh\nA0TtnJlg8wZ+47n8KlXHE9szH9hZXaofdQXu0ObqaU6eDVEeegR8Jl4uTNCO\nYqwXawEZ+oqwJiZathkjrg4v8ROtwdXbRlejGFHyBoFE1sVb2d+U2hyfhSWG\nAHpIiyftEr5b1LT9Tbn2u3tCuG0fAqbdR16qURE11FE0xJ7l/LsbhpetafRm\n9INwKRXMElUhEuNa8hysBAIgPFMvy61108FnwGzlyOLXamWpMI/a/wTQKt+H\n5Ul6kQXpufGgH9LPTguKcpuvzrPnaIOj0zSq6btWVhMCRup2w6P/eRzDnICO\nAivh\r\n=AnVw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEtMU2GK50cwHAiOf46PV4keqjuLF9M2QcQ4fGojbeHlAiAi8r+yC25HyLZVyXHw/WOqG6TetbVIFqhsJ/CXMeMDwA=="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.32_1547088123562_0.7751553398528899"},"_hasShrinkwrap":false},"1.0.0-alpha.33":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.33","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.4"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.4"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"c361bf275bdcbd6e5d4e73cbcb4f813f1561dcc5","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.33","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-sr6Q4S66Pdvk8oJ2bFqny1pcpVsHfSFQkofkXf0XboElW+GvTilshCOoZ+xff+uGJgPRNG1gs6M8Czzy2g6RaA==","shasum":"ac0b203f26123d9c1ac7183ea9a997f17841c842","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.33.tgz","fileCount":38,"unpackedSize":556518,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcN+YzCRA9TVsSAnZWagAAFkoP/2lLC702Uk/LYz4qs3gq\nMbZbDmcBXPAvhRDOv7XVUUlKEx7wONdEjdvDRutAuoylwiy8yNpvBUMiXTuc\nLR/zIDkvy3kQVWlfqxahXd6If1EEiXS77yxWL8ueWS3OPK2WAJxF+DpGhJgf\n57OTFNNtJWadcH6UpLl4DOBZs8UHtXeLrng1w2EXnACCyNZUOGqlhUz9spC4\nvsMpm7rnpY/yHBMI3s0PLUrb0GwwzBzZ2mBz2u84tyCgYX3q3ShcTxxM+ttV\ndgDRiZzVnkwNkH7KIwe9yOGrHkPCGcRSAK9uDG6IWbouWn32bDY6GhOENUld\no2hEJb8zI2Oy11KFy8E29DKL1Qj/gZ8nJcKP9oeWIUPHolWX4kyyMmdi3J5Z\nGd/yMgkRZxerQ+DWpk2TuQivZF0JsVYI932YYPfac1G177VPWXX+Bg+JU+LG\nU9P5sdvpkVk+ZBnK7nR+FpEtnpMBI9D1euNsMVC43jFrhI0vxHVAT71H/3Ke\nJl19c7SZl6j2DNBlpMXuS3YYILJpgIXrr/9R3ihMuBs8SDTOyKDor6zoUt4a\nINxBrKAAYp/r3AJ3tK2vOs1kvAOdehksxDRkU7bi6N5iSUVqbuM/h0BqI7Uk\nQlJClzPD5ZJ5vCjVC3SRnNemfU4vocvz/E1TpJvBbhn7Ql8TpXm3djdq1Vnk\naUBs\r\n=hdng\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxfg1J/DM5Zms43SPYMiz7IjXNcCPA9Xk94bkfBOVUQAIgTTrHtD7YTXCOqEg8MFByK4JY7Q0o1wcX+G0AyFyP8Qc="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.33_1547167282469_0.9758037456719655"},"_hasShrinkwrap":false},"1.0.0-alpha.34":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.34","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.4"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.4"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"6f1623fd445f59f917440c46251a1941d7553be7","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.34","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-WyQJGRp2MFypBOY2LBu7qhJjui9si6PWLObrfTyOSY0eEfkVhnm8yMy9zc9YyT6bATSU9+wM1VR3y0U2iduFMg==","shasum":"85dd12e2c32b4d3cc08f17934274355d5333b3a7","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.34.tgz","fileCount":38,"unpackedSize":558792,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcOA/HCRA9TVsSAnZWagAAQkoP/3tEHPsFlXGUVh7fVZ8d\n19cNkc/yyOA1RNGySu7Zf8Ul0GzmCfQRgWGs1MByThz/oxLVebmXSKlsGN1I\ns5f6Ir1d4C0VtFsgd65e1Yp+sDml4jX19SXN3XtN4ax/WQRNLVpisWRUkmrU\niSUjj2Flsrzw2IGGXF+fjAi0kilFAvPaJCDeVRMs0xW2lO6XJd69b9NS2cN6\nxpY7HUJ5ACMfNHF+M0a9AZPNVkx28HC/9b6WVTre2wvTjldEGLrt2VUgBiYN\nVMSlRkSYkWldv5MvG8OEYeLwP3wIGZC0uVBUnQvWCArf4mSM3YmMeeHhxhIi\nu1pi4mKfh56R3k0sRMpgwJ2ZqsIO9gd9iRssvj8u0LY2+6k29CKlkv4DdNql\nSkxw3kerwY5mXqaddOCGt/9mJwnnfiJyEjo0WA8c4zNYsQt+0YnK/DwjECRJ\n2kLNuxLKd6xJr9sppwphj7JZT7j7YhMdus8UGJp5Hu3rqwu7WKLCQY5pwVlc\nbi0mg+FkfG/92SdqrVywZNNYbVa5VmZW8VA647dxewh1BXpWQogoVortNFVd\nc27O4l2TR5vHlQPcnmqTQ5ZxAfRq1NRQWEah2r17ZJSOQXGYKb94m1sIM9an\nqb2eMk8btIk6VH5KfMZCL+YBcQmCVBT0bok+i/Hzyop78iAwEfZpNlJATOXo\nMeDq\r\n=YhGR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHkgh/zsK2TFpx/fGZj5qJRccohXMNCzAnOypJo+S6aEAiEAxSLEavZqMDw0QY2nifuJvuLkfWxIzPDa7tp/qzS3Jpk="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.34_1547177926223_0.17569996509453478"},"_hasShrinkwrap":false},"1.0.0-alpha.35":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.35","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.4"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.4"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"09cee5d6511c0a2dfc9a96f7c64c6aff91651148","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.35","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-bXe8ctvYM3T1+ZVMS8umNGUtKGX2RHZwDUcstDY+oma4+Gt9me/Swk8LYtS66JEwDI0TgDU3pzMuE3dFmhHX2g==","shasum":"2da199c1bd1ad33b978bd5e713fe4bd85e91ad2b","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.35.tgz","fileCount":38,"unpackedSize":562954,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcOBS+CRA9TVsSAnZWagAAojcP/1tKt4zVOlf4hf9NgB+w\nADjFV7dTHT1BBxKsUi2IyZ0FsCD+7ZftO9dhQA99gGHLzmBXFF8r8qf2Pne2\ng9KoP3TFHLmzFcKU+SKe+8eZDMWpL2pTgCBGABkeY3+uJHEOkQoKcjoFj0jX\n33+asu8Z0gEOTHEZ/3PYni6oPGrhfQvAJjTD+ka1FsubFcJkFT0oFL3h+H51\nOhqjxGSAWoXNAgMqpHzOXcsw1jPuyIhTqdL2Hjaof3GTP6BDXep2BOi7dm9s\nN6i0+buryEA+arYNIK4UCP4gw1w5W5h+etR9nB3w11kAdlMQMZnuf0Sqwmhv\nopto9VmzXpmuVGvk055qCxSAqafBrEN7Q3TCgjpO6/Th+IVUcAIVNVbTmnOk\nT2to+7nWVNcXWEyEVx7/FCbZW7iWXcbgkXUxDPvWE27eu1N8CehT+em0TO/g\nnEIw1HNiQpYbppULIn3sDKZrbvqUwGc3rbnCH9moETgv4PqrH02JZK2+0yia\ndiXHDFn9S/n2b1oNyM5lExUetdPWFpLQj6TYyXll6SmszSa+BjBUOFskioT+\nn2qbacWr8qc2m+8VUa+AzKghv5L4wh5pjTHjmKlndfkUNAF/6WH/038R93l6\n59VVWKaoJRxE5hAFbzVjCvtIfGrfjkQd2g82203kn+6hkHEJ/OTKP5rnreXX\ncAI7\r\n=1KVt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGqBd1eRMb2uAwoXqpdH+xa2g7PmmGJ4lKCMd7vGJx6jAiBEbfWMFOor8UM0ZBec8VvQUQX+8l+qQzDsbj9Rwgs+hw=="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.35_1547179198207_0.3984498549094293"},"_hasShrinkwrap":false},"1.0.0-alpha.36":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.36","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.4"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.4"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"83e29a2226451c0d002cc97c9753c6d5eb1c2fb3","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.36","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-FfhlDS+yZuopgl9xvock8NKnhhJXImu8XxpYbbfVd71oLV5e3LWhj94I69MVCRz03pg3NPMZ/drWLlR2j6kBbQ==","shasum":"26d05569029cf795d23505f75a8b2439e0055468","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.36.tgz","fileCount":38,"unpackedSize":562874,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcOBb+CRA9TVsSAnZWagAA2UIP/iewpSEGJ5Z4FIW6hz7A\noeIDL/NWGnNzxGjb18IvYHQyZmzoHG/1xFDr9Y44/lWonLlWmLwgfwKiZkp1\ntBn3FVIBAagBnNlDnH8aTSUYBbhYZmrCnuUgvtvTfISfqF4ovdUizb5dPyCt\nZReyu3v8xO7i+kmldu3UBvPiIaXrRINaW9SbOi3yH4wnJKvDTy1a+QT4j1m/\nTSWWds7ZyA2RV6HMtyAYG6oilBFRzeeiyM+alLmr/Vup0nWUyo4v7nZm3HBR\n2XOxay4MmqYh7OXuSN4vq+rv0aKIglC0qafRZkJtN2E/ZoI3odcbplcfmFSD\n0eGBQux0gLMZVCc3lLyoTiMY96+jUHrFNPhuqMO+FhaWJarZf0/YaAXXycoT\nG6hnhHQpHtK9SrS9f8x87bauvqaGgGETYc9TFO2L+cYbjVhUC0kDeEDSq3EB\nNoMEMg7H8V+Ibmwin0GufpqwGKDhPjEd47SayzO+5Lgn0svNfoB8HXpW4+a8\nZT46IM6dQR9o8mtM0LzSPRQqgr1y1yMOzhow0uYCRclUo8BeJMRoeHgdyds+\nGnN796EMD5JD5Pl0r8HSiYdHfEj2PKkLcU6/1yQorcEs5gt3vOFD8YJ+fW3o\ndzo3k5mzTcvabIezrEvejQZ2y7FKlh7WAkfVnH2+gZfgnyNWVxUHBojkP7F0\nax5r\r\n=C1Cf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGMs7McfMJxxDAHkGcJ98Ec+mDhJpnvPPlQpWB0D2fm1AiB5kw8YWOAoXWphszpmAVXfg99XWH80YxQvYCpAgb9nIQ=="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.36_1547179773965_0.36073203242354235"},"_hasShrinkwrap":false},"1.0.0-alpha.37":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.37","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.4"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.4"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"83de8c4ccbe54a602a0e1854650f6a0eca957a52","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.37","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-YQIHs0yzlJl3DiVeRXxumUdRPtcl5/I/aRw5wjnQOm5BIaK59t3//gnECYlnsFXmDC9QPAQW9sdH1kT2T7ciSQ==","shasum":"4bf6ddf8e58007965890cbed178b8bf6536a0d54","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.37.tgz","fileCount":38,"unpackedSize":564988,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcOBvrCRA9TVsSAnZWagAAuusP+wavVwDiK5TWiuQJXySw\nWiZ1t29zBH3EEHZwofhyY7B6tey5JUHTBlx//qsc7+0tJ0TTHzwO44uyZCw/\nohaQdkMrez2utSDVYSglzrYiCKFSUAB73f606pZsuGL9IaPFNhbFXMi8eQJh\nZGtyXeYWZt9AE0swGG0+uk5qCvGN+WWXYNq/DGQ9EvGqT7s0Rttrujkm+wxE\nvVSxT7Xl65WYev7odNSU5felvuOFeETYEqw/wU5zPej0hqThTS3IZ6zOz20p\nzX886PCTJ7KH9/XUYXvFuUyqYDTleo71YuMnuINTPA/TvasRozvXANCbmnJz\n4jPJzqs3I/wfUDAr63HNZG1nRTYkanc62O9eEKKbvcq9HnhEiPZM0nb3P2ZJ\ngnF+r/cWRbLycmBEbjUJWZfZEYXt8boNTD+DnRLfCOOh1lRRm5ljMYPOrxc4\nJGnRIPi2mTRgcWGu4ioTULObip1Sws8YqrKjNXQ/27TTE3/r//fF2TPM7GIj\nZ1TaSJ7SojTFsCmPtCDBCp6fC24CuaLuSxrXSSdJcYAUJ8S0ZjHJX7AYPlqf\nwi9RJ5z8jIKdJ9TBJbeWEziin6NMLYXS+Ma+vBaXRc0DESsIubeZHD9Gu+UL\nfrgYI/TijvPks1/WwPkutabR1Z3lPwjKnWqfSSEu/D4eiLCvFX1Ef0oaYZGh\n91Gd\r\n=KOzf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC6yoS7qj3rABbe2B+6KLLaQXylMqFRObVm+TYG0DEIugIhAJ4os+NMTYerQHERtyUt8YXMnQ/xQDv0MV2ZdNSFzdln"}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.37_1547181034465_0.8688612337624744"},"_hasShrinkwrap":false},"1.0.0-alpha.38":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.38","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.4"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.4"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"0893ef01beb757f0712c2dd0dbe0b47ead480453","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.38","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-GuO2Q/TayaDN7s6ht3af5EJGUU1HuzDoWjrMqoXz7JzxPeyWXlxtFNtbhrslJLdpSY8x29UUKGBJM9UunDXmrQ==","shasum":"4a41930af70e1e45a23d283dd78c9d106751bf2d","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.38.tgz","fileCount":38,"unpackedSize":564986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcPSzZCRA9TVsSAnZWagAAV6kP/2sZCS60SBiZSwl8vqej\nmXw/OL1xKyjPYMTVztVQnaJKRlmXGqjGIN4Ye0QeAskJEROWDqotXM9Dlv6w\nX7DFUEynZj+p6qBqqFpOFYsMaGd+yBUVB4472UQwiqVpwcg0nb1bK7Xb9ZiJ\nZc99yviJGU/EOpBBgaUlr7l69Y4BDGBNqF+jJzzKNzPzoNwmCAUsp+87vIPB\ngE02AxwXMiwitcnTzbKpIe2A89sQM9w6L2K60iveDcJxe9zT2hfeT1xbPPY+\nsZQidqUbDAFRO0PhzFkNyXu7XzQeIp7xlxmiTS+OK9dbJHnFXy3B4ZLbeMBF\n0yUGK5Vykbx6RWVPLcW6UEOGmAGXoHJ/iDv8HnDc3irjII0YoStxjI/rWLZJ\nVrHgY8mNQTedhWtGyiYktu/esC59k3CjNlkHZbMCMpfbZDtacHMwcE0hfePz\nqrugCpTxOnc9cccLkS4kSMlakJGOa7PwrAt9FmfQTszJYhpfoWq+dZOduXXC\nNnN8rit55zSHT5jBv/pd4EvkPzP73zL3y98UardzEEVp3SQ5kABV1VlJ9GMF\nuYYpYbvt4GJ7uuKs//tLPYHSDpF5fvTTsFKmyXHYYRFtwjNgKjdt/dOzblJP\nHWTVBz0L6FLhvb1DneW8g9u97mtXbTz+tXJfHibGXYYwBXlxLPESMr68XAf4\nxqLA\r\n=/FQm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC6LBP8gRTEbgMBIqH//ev2vRXq/V3f40EmhNODHeVBWAiAgyhaopAQW8BhLQGu1UDZ8/KZ0kRkTDY+28D07/ShGLA=="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.38_1547513048631_0.1117544194508786"},"_hasShrinkwrap":false},"1.0.0-alpha.39":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.39","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.4"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.4"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"4e7d00ae6e135e1ebd6c396486d0ac9925c5c5be","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.39","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-3DA5XiJhTs1QUKqsnSW+zrj35wHXRYTEIcE2ipqYtlGzVxuRnLtb/Z49GQRvS0QgLcGOOZ6gowd1dAgi/z/fCw==","shasum":"c606593a3bf28c99f56db5a04ec23cb38176a858","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.39.tgz","fileCount":38,"unpackedSize":564928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcRortCRA9TVsSAnZWagAAUEgP/ipkNi4zHsIz8Nhr6Qkh\n5rfYTUViDSaO9/BSrmaqNORYYGx8+ygRxTs5brLbgipCPeDGDFqSHpuArVx3\nBqp0jU1X5uzek8klmQYIa61L3z8Oc8ykSoLxtbEfMRYGtakSbLqucmyKBd7u\n6rOuVfDLTnUUpsig7/bWhWvaKP5mfVA6zZ1dotdB1W4AEo+4qFIwZgujufWD\n92XYWVg+ZAR6NEaPCf09/ffwXB6SB/aUZORbztTKGeAq9ybarR/iBbSz/qQV\nC7y8ZT7PrGnoys4m28Q/UvJ48jYVgnlpI/KEZVofol6fpe5OASDypFviNgpS\ng+dRJzE5uPz3ImZIjRSSf2MAbw3fA3rvgPxK2+IzqCVGWvvFUJeYL6liHWSK\nmSL/1e48wopTzywRvdtB8NXWNQzukahvR1Bpjb84OKVR4rBdi7FLtUj6Ih19\nwUU8n/8oFhoSPAyA7w/NIGTE3UnglDxxKGWA2o14wS12zvb8aNv7zIvMgVTc\n1Eay1yBoP+qDd4a/vqcZgSCUW4R5c3FQ7UM/KxCyBLIZg9HM6aIdrvZ6bK5h\nWYNqSUYj2s8EM0/TPjeLp1Zr/AiJgJPe9xiwA6iXd+W3nqweccw4FZK+yygW\nKdmxr44jMfl0/7sZ3qwlYZBEblp7s2W5/OBskOBAJlaMGUHpKH7bNfsCiMrw\ncxZy\r\n=Gmln\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHPmdI8EOq1BMcYPq3ESqKvSID0kOZZZqS5MX0HEdggpAiA6JxqAEIQzUu3WQgda5x6TPYrQv+P7D0Ms8qOrxDNHzA=="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.39_1548126957049_0.6739638957347176"},"_hasShrinkwrap":false},"1.0.0-alpha.40":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.40","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.4"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.4"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"4e7d00ae6e135e1ebd6c396486d0ac9925c5c5be","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.40","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-2x3h9H4SstlQ+wR3kREypcy/iAZkpbFnhkWnmenhVhVvurIhOb+EVpCr/maFIHF6TLCOTeTfz+Dy5tsln/o+8w==","shasum":"8be668348645a2c461a1e9ba031faad9fa006317","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.40.tgz","fileCount":38,"unpackedSize":568436,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcW46OCRA9TVsSAnZWagAA7YAP/2QdlOfGEtw242r/RVje\nX0YYlgoFYudIFzz+yBBUjoeqwgzEqb6hR6ehkdmp/yLU7ksZtUGfwgG6Z4NY\nLjQgl4zgEl5yzu8pxeWKRv7T/7u/nlqRSms2+uiOfhCAdK+hJMOm2NahNqbk\nbWVknPuYnb7tTXFW5mIPOBm03Bi/i3aMLOi9OSuv7821FHLg9cPeQ+BPGQaZ\nVqTSb/fqjUO1JQ/jVM8qKQdFcPrE0Hn2k44J5HHwjth045nOU2dFWqoc69eP\nQ5HLVL/lOGdhuxzFW7wontpQu5v6iUuxtAqj8I8LNYrqX7dm4cmPIPf8OaX9\nPMIFSzYQG3WlTN5tdp/ACNa9EEc1zdpIZqgwtChRH+obgqc4gJXzTpwm43mj\nLZRdETIIoAihOtiWlyGgq6/b8BjhCk4PkGBFAJATPFSH6zR0mhMnn0R3j79/\n+1pwLjD1y9iQatCl3lhTFYOFWrR3R/x58ihpSRmWG2RllKuDRsZq1ifSleIf\nyxESfCgkF9KFJxb18BNxW8yVFoqdjqXySdVvgMJsQqC1QcQhPPf6dBUWrO2u\nXUvRO8oJNXi1yZWzYNHhHFyHkuQHJA9MZ7BuZ02j10OHojb7LSjOfIZwinTr\nmLCXGowSShCnczGiMeU1fMXjzkHQzBfpN7qepvNMo1j0wsliWzmTCQN9Fuhd\n5jxa\r\n=9Nm3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQDkrqM4wpoMl6SGYxBawNqnm+ZNqkvl8YX/vPeCPzHQIhAMV9abGJs8yumiGfdRrlWXUbUa0/piZGZMJziup6O17v"}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.40_1549504141764_0.8673734415373029"},"_hasShrinkwrap":false},"1.0.0-alpha.41":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.41","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.4"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.4"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"4e7d00ae6e135e1ebd6c396486d0ac9925c5c5be","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.41","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-6wAOvEsPVrgeIxj41lN+O4e/EquIjosk9mLyd7RlMZ00yr+BdMa1Q75BhDEmGTQULJamZPUbbY7RoFcMhWT7lQ==","shasum":"31511dc1cab5a144811a8346a0f9fe031f618a2f","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.41.tgz","fileCount":38,"unpackedSize":568528,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcW6KuCRA9TVsSAnZWagAAc9EP/3pQBZ+DXZZ4WxgmNTdj\nMEXHBQJTcWCh23Z1Tw0bPKpdzyAM2uom1pA/ZgOH0CK+dTfG13PKag1hDvwu\nx9vOM6SK88Fwwjp8NVtktaVaCheUPNVidtaqzfzXbFdCo8X3F8WmcQz3Zhh0\nmg/00dXzKkURKc2G7OFXWa2AAUtAkCkP40pRhexyyTJ5/nMCoq3syKYoFII3\n/jO8YEdedhP+JHT5P6UffR7QIVGEP31wLLpURhUmR4i4ofMy8VAl396/SAIi\nMcX+IbPr2sIbcgOfNbEpNty6x1qc9Rmcs3R2pz8N90+neWQJZj2hmu4dE/OF\nzqqerTQCk6313qDoO+HwBY9DUUMMlVj25BIp4RLzQ7HmchQRSQpbu2kGG1+T\nXZUApfhLJXRe4SMCw5G46GUg5Gil+XUJOpc/Nw8nVt/P5myFFsISd/FDAwjZ\n3F1cYra6EZ1no3cr6aDXdDH1URxHDb5NH1au4a6ZuWgFZdtiXxYzN7XLnl88\ngKKZqZch0/rKBm3je/FTSvqe59rt8HWqZMoXH6m9gU74zIUCs9uDKhx8AjWy\n8SmMrYnd8e/tiUcmEf31QrD7PhAIaQQtVL5zX/k6aS4D1pOJxamQiwLz7wxG\nkHkEtsorjL5UqpDTHXN+T2vO2U9acp7BoMDlybEQP7ikiGz1sQaU2Vvmk1C0\nMZgO\r\n=QsAc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDGK587ZAle8nfDAQXAFeySkDLtrgFpbeHguDbsu7/JSgIhAPRbD/UKq0Kx20twJMnV8dFt34AltgH6emn/2NtuFTj6"}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.41_1549509294026_0.4554546227463192"},"_hasShrinkwrap":false},"1.0.0-alpha.42":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.42","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.4"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.4"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"f8fea1a96a1f3181fc8fdec59169649cdea617b7","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.42","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-dQo4tamyxoLsKa8Hj9jqQ3hIz/UVN76WkgfMK+k/VxWKyTmU1qAAi7fmIna6sNr8keZZBk+A7UetKsZH46XlGg==","shasum":"8d19c71b0af331669d0a2197487fea31a67b5b55","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.42.tgz","fileCount":38,"unpackedSize":568517,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcW6SUCRA9TVsSAnZWagAA3XQP/iVf0BwZ2WuGwYUaopzk\nNt2sk3thh9WxbQJsbrj0uaSRZfM04UPs9y//NTl0SwHAK3Z970S6FuXvhJ2J\nk6LN8bbWHTmV8sKIe0eYGalSVFA1D9h/7nwDLejm12lZz9fpZtEy4jr3KL0/\nDF3Y/Z34QrI3o3HVUX8OBWQ7Pnv2WeOOTnyFCfnLrdIbzX0aR6FnyjQJxaKf\n8YCelmrD/+3zJJ6PslUjsPTNsYZuk0ynLKecIBKElq0KITl1qEX1lOK6HoSF\nlA8fvM8OmXRSUC3xXiRRU59BT4jAYcV1BF4hFBytZ5+fKEh6Swby/MsiETMN\n7gBCI58DIgrsqXu0SU0iJXzZHzQoohO69IC9i6x3HD54VACoWsjrcakDILOo\nV+qeTQcDEVcUC4ORPrt/jEnCHG9BqgOJbShs5mfeBKohzbomfxiCa0FagZMp\ni4t+RSK1dO7XyXd73wRZFHPBEiBK4MD4R9sHdzNMPKF0ut0X81F8EZ/8PH3z\neCVp1xlqcfCy/xijbP3seqJ5i3k7DRmUXbBK443iz7B0SRSUgTmzY2WTzxA6\nyUo6O7rT/ZJFePiEFjK8j12u93s74OYXujmWESc6e4zGsursobbRuI9qPPHd\npffbCHncX5gwo0dCDskfszN3wPuu/oVuUJVEKBW28H4REGYVbfsEXxvfqhgc\nZDqR\r\n=Xnm1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBahY9Cp6YKY56a/5gzCT3pduPq7PnnhpxfuQYr0daQFAiBCcZcak6hszf8ZS2oVdeyyR0ee3EZkIPFz00kuL6tCtA=="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.42_1549509780182_0.22300719042857975"},"_hasShrinkwrap":false},"1.0.0-alpha.43":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.43","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/plugin-transform-regenerator":"^7.4.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.4"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.4"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"98fbd78aad064083bab67ce412be865cb1b81870","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.43","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-wQxh+sKiuQBN28QMq8iXN97dcBSoy2SEWJdXklXHlRjdLD8K3vlPgIielrcjWsyZOUdgR0OzPyzPlnw3SUVYdw==","shasum":"467bd8438db21dc75070f835f7a175ef304eab61","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.43.tgz","fileCount":39,"unpackedSize":575659,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcoYiQCRA9TVsSAnZWagAA7v4QAJLBfbifHhd82ey6MCXH\njPUBW+fhI6kNV/0Eb8DMuibd3SM/wqd1Sgo/+fi23QIbGm4u5fcAhboiUULt\nCTCV1nDBOVNWe7J9NJAa110bhswRncGg9J/aG07H25aveIqsmXaB1HtNC4wv\n4sQd/5F27cXZkqYuW1TL1XYfnECrNn32bnHdw1ObEuLIAiGFvXDl3FqACprN\nBKIiS7QDzjadjHw0xSlyra68/pGfOTE4NzTNdynOeNOqpdjtTcdUdX2/SxE7\n1qXZzVyb+TsT0yO7CC85nTUHLVuC8nKmDDJ3J0aRfGptzgyEjOqC2LhPxgxt\n8mhwLstsEaM58vOqxNKMzdaBmob53LDsI1Cj5TkxCczWF8q8+gzNFt4yQ5rc\nBTyW/7B/5AUpSEwVL5kkQ58K3vggzsHb3Mu7YGcld1fICZWUxoaB7+c1ibZr\nOLXU+3uowr1AVcu5FIIOc/T5/gTAyrwfb6JgywsiNF7/1PTAJ+NBxoSGRPxj\nNSMwcI/BOuKUu71ytRinILqBTmddQX3Sof6ezhcPMLdF3Chzre9EqxnkGkcg\nmOBda0wgkedhn5HbrBGY0tpf27UMKPTAAAFbwn/82VxWmVQmGklM1f4+FFkb\nTnFE7Nt1Rq03PTnmkMYcwFaeXQzrH+xfieyYd/eK12ZxwQ4Cs2rmfyQ8o6Ak\nfy61\r\n=UtDV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE7SvgDNqIWzLpa7SHRv0p7/hqExPKseQBjWhFlGKsVnAiEAzKw8eDWFpBaxZJaVBR2YA2Jh5bo/bkE/OGXz5+Fl7q0="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.43_1554090127641_0.9319602183324704"},"_hasShrinkwrap":false},"1.0.0-alpha.44":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.44","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-async-to-generator":"^7.4.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/plugin-transform-regenerator":"^7.4.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.4"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.4"},"dependencies":{"regenerator-runtime":"^0.13.2"},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"3be93daab0bf0359629da4dd25d22c222f76df29","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.44","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-0vwcKRaFg5lzSV3zB9UZqWAGAiQJ5tZPb3+56UACMfjRcdUJ5w0b26j/iIQUgirVl0tVY00YOvEaG5Jl6pCspA==","shasum":"b53ac50fae3529da2626a5f3b966e7d7bfe77acb","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.44.tgz","fileCount":38,"unpackedSize":571721,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcoYrXCRA9TVsSAnZWagAAEd0P/1g70b2o0/w8fo7mb4tu\nq3BwvWCWO95PnVuERN3QkKyKrbMBtACnJRpLgiU1FaGRU7ud/F7fF5xAhmAq\nlXFURr+QJ3Pdg4GJinGTO4AXTVgd7gPT3rc+BtUD0P0YbN9f6/XZ0maEr0B4\nCNRzkCOqCGpQ+iAq0i2LJwIAiyDPdiRWJn/vQtUCkt1zN/XUF1JqXWWnzoff\nJ4F1qssNntMhfOh+asE/tC8l4CAHdzsPh5pYx/qf7YyoAVL4ddlOIIObGfD0\nhYpYB3GpWBb2yXJ9d1/GjBXu/4Uiz09ftbYslzVczJRzedUE7/r4ODFj8QUL\nPFQzHOwYfjSGnvKp9wSqr3dfw2elBBCgaI5WOimQ3OrCloL3m2OCYaCRfdIM\n27SaAPBy8RlqRxgkQtBFA69ko+nx7s4BTVSd+KOwvwKDKHjBAlGHIyEgdBg6\nL9RClUSJoWkRBnj/zrcQ1RJo5/qsrT0Rg/U+mQKrzL6w+s6Akpdb3UgQEKrd\nI9ovLmWP1DKRfF8Wa0olkr9+JoIaXwBXGvxpPxkql1uIcMsOdptmANzm/Qfh\nBpBltLCQV47V+dNtes/vYf+qUfdBU8zpV3rsFMYNAYLuQmarqj3x2tC0acg5\nxy2rKNuPBQUuf0d9po8mGx6LHpXaKhEks/qpc6P2JKGvgdBANrgQTFyjYUhU\niT0F\r\n=NlSn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGvXpR2dTIK7SQ/0tgr18OKUfC/tAwIokgznijlkTTJDAiBrXAwzInum+ujMjQZ9FWDGZlIuCl7jODVbyKvUUOM9OA=="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.44_1554090710799_0.08076869447754964"},"_hasShrinkwrap":false},"1.0.0-alpha.45":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.45","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-async-to-generator":"^7.4.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/plugin-transform-regenerator":"^7.4.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.4"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.4"},"dependencies":{"regenerator-runtime":"^0.13.2"},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"3be93daab0bf0359629da4dd25d22c222f76df29","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.45","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-baaMNBpBmISFjhuo0N6MjpLD53mxb5RX5p+HPadnbMfF8BrZHfNB8SfCH9JtIdeOFgAdo88qA3bvtLmdp2oUaw==","shasum":"4314f12e44583c607ce0f470cb4961621d66a218","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.45.tgz","fileCount":38,"unpackedSize":571846,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcoYu4CRA9TVsSAnZWagAA58gP/R9XXrXzoUjb6mN3mmyS\nudJsSyVnpvaJhEQAPcxTszMmG6nWQzbn1JPWoyLMrz4z7+8ePFhpOGRwgw/E\nNfd7ant+GLssy9HpvIPWuJ3BB7bfs4+8bwkNGWpBd2fZIaYbnBIau6j1jY2z\n2gwAfdcAZb/BbWeWKALartOcfGGiCEZ2q1a6SjStyWdyiyeSMLdaUCUGLFX5\n+WehhNYcX1tlc7270VIjwIfGwOTTbKOOaZHQV5OIqlO1HsvAcyyv+8ZW97Gz\nDHyKFeU4+M+ZZtW6StfVCNaNMGslMb9ht3CZFVJ4HxyfeifDQfCpflIyenHY\nnakQG57NEjXTUclG2DaEyZyGEx0LsGgffBjr8Q446mgyT/aep1/GqIpVJ5Cb\nH+RM54gW3Nskqwf4OCDr+gXYidGwHX4/dq15nHOHmEiNSd7bVDtoVCc8NHIF\ng7j23Zkq45JVpzPgBetJgpEvCxez57VN9Dh0Fp6OFZFr9q7npyMgxnKNqCgM\nv62BTVcM8kVdYySsjRGwEPQW4/lj4xcaL+Mu6jAh0iE3pn7A3m3WtxHXHgFL\n1f/MgYQ2gS5Gcmj6v6tVnmvntU965okveWMcBqagkWyJHEZP0rdzaMfZBPds\nWf5qPlASq/7lHM5+0LeZGkvwix2V4eLZCFsSV2d+ZT/nKlwUoKhzuWuHJCEV\n2Fu7\r\n=XgIt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCR8yvGvEoOP2Nn50jUwcqkJVPN1nabrhyccOeDU55YCwIhANLjoYMt7M5B3FWsTjU7/JFy70RhCsi0WUXRp91xr76M"}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.45_1554090935499_0.7873655289937285"},"_hasShrinkwrap":false},"1.0.0-alpha.46":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.46","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.4"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.4"},"dependencies":{},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"3be93daab0bf0359629da4dd25d22c222f76df29","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.46","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-tVtNBDRrLqG6EYT3KGxnkKV2q1cyBxv2Q4tJozGorwSaP47iiLmFC+vS9kUt226A+sZy6Q7tULGJZPFGzKaJrw==","shasum":"5fed25892946b95ecf5b3a079d300c63974bc739","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.46.tgz","fileCount":38,"unpackedSize":568517,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcoY7vCRA9TVsSAnZWagAAIaQP/ieeL3eHvthsGmRfwiII\nMUGoMnblJVL3ZjPGJUW0Orw1hxhDBRdpKIwBnjrRmkavGGwcm0H6vtIQSO3Z\n+Q/Plqfd9fAGpZYONxrb5VfhswoHtiWbJOAXviZYWKk8tQ2ggoH47d73u9j1\n55wnCwlZ+wrQKdnBmqIZd38MeYNV+Zw3c9T9z/5FeC0+pNqnLQiJkmx7I6y8\nPH3pdUVF2uTjFWB8GFbTVAu16hAzcTFSiNbw1UYdfty1e6xQChljkpixQgT6\nqa9Sds3ZBQP6mqGDIZVZG7NKjiUL6iPXIZoBSzv23b8D03juEji5zMgZjbKn\nLsvo5riekfnDRb70K+BrqMoMo7SEQQqU4kThf5FqL0TS9RMX1lUdqU2rC9jz\n5aVBU2WJXqUn44bHafuM1BpQwbaa9G1+zZNnzGSbYvbtMyh+J1aS04HPsXnV\n8NOVyXOGA1Y6JJdrFFtAP1up+Or5j6eX/OgQ0PZBNTo1NQJAxloVu+lGsO2m\najjTirGqjlz5fC99DWB0YvhJ20rzN/OPvHeFuFzANAvxc224PPaJsWHaN6Pp\nFGIxaK1QU9nVGKVPL7hgtvX9Zq0JFIy4ACONN2XMw9r5Q5WBprRmZ6qXoqSh\n+0IEGqZV2M7v6wSlPES0pxbJMuP4Tf+1bTzUXfSv4sGUpaH3fNBCFpfJpx3T\n0O6y\r\n=bfkO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBrfPBfXucvHfwajriNRK1AwFGitPHOT1DqVY+wLhLaoAiBppi1580zdwj1+JO+eCS/bhxkqYwU4TwHjvQtv1vZa3g=="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.46_1554091758474_0.24869604451271732"},"_hasShrinkwrap":false},"1.0.0-alpha.47":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.47","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.5"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.4"},"dependencies":{"regenerator-runtime":"^0.13.2"},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"171d78a8cb7d0b2a24084ff8154c34ff12e5f8a5","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.47","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-0qTwrLfv5TKFRLv29UHFkMYkj4zFZ1koI2v9DLy5rwtX9incA48DpP41o/z3s+j7CQQ1j6Q23QaTTQxKiKDttg==","shasum":"6096165e983a256cb2416a603fa800ac8d9caee7","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.47.tgz","fileCount":38,"unpackedSize":572181,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJco+JfCRA9TVsSAnZWagAAu+wP/R8UPHvmNBbGAv/wpoXk\nKUt/8AXYkUGgpp5fDq2CPWWEH7IplSPQvOWfY2OdIV6yzUpT21cIMW2H9wmD\nQePAil3T4v/MXEZjkfmxWUawiT9/xot1jiH2DM9ydOKlHFNjSrGCi+wtbvjK\nsQmK8LoLL5ffupT7ET+RJXQVyQwEbrPNDpRMEeWQPnCasplse3fOPLsjHmk0\ny/rBBhNNam7dML++VfmseJMdyvCeLlw04CHerztj8F4vP6BRdV6O6VsmH44M\nzKh6emCYRT1pCFRz8WJcNSMvyO1+QiRiDpkg9lZOeBzV65qnq8UGGXW+GHfR\nTONbfoq8Ph/XvmsDX54dcT7JJB8z3T/eT4GfZn13i8kgVzBdD5yJ1jjNbT18\nAO4Q3Ck2z+Dq0YEfNokD1b6W1xcWkbODXqsPcReG9ijGofijU+3QmrgWte5o\nUJoMKYGJZW540/vIrecKC6/0P2Th04e2vEFZASQUjGuQiTGL8Xd4TnRSIKTl\nGQo1Uwz7hjfCXzwOlmPNH/htUAv+SKNcnRXli/EL/I3tVOXIUa6PMCj2qTFG\nRe4e+9b0ztbOrqlXWUQ/HHt38aDBQ1HB06heMziq3/+Q4pMo/q1NY4n2zkIH\nCXVgoRjuEf0pk8ZrNqL5ajs3mq/mW8U/kIjUH67rpZuziKm85iH2hnRoI+h3\n1tbR\r\n=FZCm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDBZ4EyrFm1eC1Uh5L8eJjJVCSWxHOnRb7TRWZO7lIu3QIhALR2oNeBokuk8dKQxDDZhWJFHSKyUtrp6nFjheC4w7QU"}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.47_1554244191256_0.5738141611000884"},"_hasShrinkwrap":false},"1.0.0-alpha.48":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.48","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0","subscriptions-transport-ws-hally9k":"0.0.1-alpha.5"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.4"},"dependencies":{"regenerator-runtime":"^0.13.2"},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"171d78a8cb7d0b2a24084ff8154c34ff12e5f8a5","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.48","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-UT0liZxexAu+gJw4wPDajarWQ5E2UZS+MElFT9AOP+XcvQ+2nIUBkRUAj8y4+RjwrkcTqZALxPeqHblGxRlj4w==","shasum":"9c8d4eceeb7074c5b9ada6a6e1388d06c5839d08","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.48.tgz","fileCount":38,"unpackedSize":572181,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJco+QfCRA9TVsSAnZWagAATGIP/iFsfDSpkyYHlu2YKNb+\nrELDDHWB5t30uyz0HONPjLX8ETdvel96aXTKfxqeTg+5g67DnKCJiubQ0qnT\nkl7FcW8lj0pjWBJEtbiDzgPvTc5lxgRTwzM1ZMtxErcnauRPfEroe0BW4vyu\n8s3621FXFuwd8KLzHF5GKUIKjmmgP/tDCaD+UBpNDRCYVOlJ6oxg8QHQHP71\ne/QfZBsuyrk7GUpRDSWiBx6nUrecsNfOiZYhbNN7nvc0ABLMi8UzzyLvc4QU\n1w/jkThA3+ID6k7bglH/3NGaUp+oaBYfrjvyWrSsWw7LATmhvERbPZWNXJum\n3/gshoJodUw4XvARtoh2h8tFhpCryNNjQpy7voTPQnmSpELpeVxwmRk3pux1\nwVXWq+6tcscRPB1zfzzDaqcPtctXdYjE5LVuqEtGBPxAJlf9BdkvwzqkG3wP\nhBh8EAXKfrQsuxco3Lcnv4ZjR6Hl7bynypD1YmFexF4Ln2wTqAADH0aRQ4j5\nCE/x9lITDuaDC+L+n8FIaYAfXVisci5vlMn8jZHDUwKE7I3fYKASj6GxDX74\nmVGiBdDz9exIMzWfrWC3V/uhBLW6o4nX9qUs/ewNavhyWl1hs0c+/b+4+ORZ\nqmytSn9PE7ePJznxa+GDmECb3D6n/boX++8Ft8bfICeTilbE3dzvcFbVz+J6\n0y1o\r\n=LC2K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDAGFdSegRtRLYMMQCsjNblREy3yUJmLt4Ce3NrJwJFowIhAKYRbo0o4v2M9juqS2Soxw73F+BwwwH8KSE71wbA5cjD"}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.48_1554244638410_0.28401675445308094"},"_hasShrinkwrap":false},"1.0.0-alpha.49":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.49","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.5"},"dependencies":{"regenerator-runtime":"^0.13.2"},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"ba4657f2da4271a91a5861489f9c7894b69f1bb2","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.49","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-IBzWUN9LF8/e1ugN9X4oTmIRHURfEOeM/pp2KIRQjv0eQ6+WtfftOtKPpvbAmSUUpD9twETD/cA7XGQRL5XPQA==","shasum":"86b760a852a15861b0f3f94a00499002610d022b","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.49.tgz","fileCount":38,"unpackedSize":570872,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJco+UZCRA9TVsSAnZWagAAFSQQAJ0vs0LNNdl/AXko2WvZ\nZrG5RQCBe73YSQ06UovU4MGsc1Ge2Y83Pjl+x2SW6in1DRsdzRsx4FtMlCy2\nIajux53BS6LwH3wU8YtvtYZsEfuY3d8KTzIxCiWHULEluT6og2UHPDi4bkFa\n5XTLNPs/Kliep+PfRyUky2sj4hYOx+Jhq9bUh9UoYV2TQM/8/+p1Hpu2Z9Yh\n1AvPvebNP2nk9WttcKAYhjggsY4T1rVs55npOKqgOqdjqNQR16Xk8mCzYHBj\njnHbhmixvRFz8LrDqzq7f9Veta1etdZ4LSM9YHGI9iEIexKhWjOdgjmfg1iL\nCLIz/F9nCQXFpbVsY0H7IP0kcv7ea5ve4hmtcXY4TX+8r3F0Fsfi/ToAfROr\nsiwmIZorpqCSgTMKWXVEfxCdNjuLzKp1X6u3zEUKRzE6tzoQPWR5Uhf9RxAk\nXWSTWqk23lo/0ThK9cHFLKAZMwRl53yqSnk4yz63g7cohVm/OwGTqiOEQHvy\nMlPfQ97O0bUxwK31bCFJJoHceRRopWxwU5AMHoBLeepZY/Qh3jOySbObcMl2\nwGomgs8GW7W2F0oBA8NJlDI0EhO1WcwjQxpc7wNIXMUeDiB5rq7DUgNGNQcQ\nO7Rp9I+u8NPdS/NxYcmbWOxqweklaQifjVftjN6cVRaSYRnNYKw81jwMB3HO\nJs9K\r\n=arVw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGkAFkNPa6ewhH/7W/sgmQeCKJ5YARm1cq6x24hMr2SYAiEAtvzqjS1Vjafj1Z9NqjwIpk8hrsd55Im08nMlYJsi1Do="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.49_1554244888383_0.4891728263466695"},"_hasShrinkwrap":false},"1.0.0-alpha.50":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.50","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.5"},"dependencies":{"regenerator-runtime":"^0.13.2"},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"ba4657f2da4271a91a5861489f9c7894b69f1bb2","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.50","_npmVersion":"6.5.0","_nodeVersion":"11.7.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-7uSbHKfe4Lu1Q0A7HBrPLdF9wBg/zxcrSwTwanhLCkL49OHYAMbmFIrpBfCcviMnA8P0fI+X4P6FduquwpDVJQ==","shasum":"382c0743d49ec84fc330944cb6136247b6de10a0","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.50.tgz","fileCount":38,"unpackedSize":572245,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcpZedCRA9TVsSAnZWagAAVlUQAI9eEAbstjRCIAR+wihU\nHeYZnm2S7E765NrPuQrXkcHsa4K2sVCOWkC+xDdrjRbVap1dckiA5zmXm6t4\nOGCACJf88VYBDElZVNQlPzBGMb0Ch2VehPN4BIW6w+qF+fz8YIuGPyh57x5L\nfrPnpo4A/wT9aa5OcHfMoKSpBQwe+M6Q0jlz3aFB3NagxXYAFy/it7fKfRmw\niMHSSibTT6y/c//bwG68NBVSGVdBM93okqs+s+Ocn1Ils9k/18WU7DoJLWui\nK0u3z45ei0OBLoGjBPFQ/cY+3BUaV6T2oDIQVn83Zfm8uKoKHPtyq9rq/LhC\nn7KfuwUUJ530xawLRnhpUlujk6CZYbDTMx4/ijTsQYqbIggvD1LIhmDv2f28\ngfflnUp2lk13mGoPfW4vB0mEmCOKbXAeD01e1aEh6VZbf51jlToYpNj+0XiH\n0uJNfzdcq846lJwASdnkMVBtPu8bQGOjas7yjgvqmtphZ8veWSsWfb9L7zno\nq740+xYU8z5Y1MPX6hkkz6Saen0MWIq0Q9alFyr8Mr0wIsQKsG4Imy8B1FKA\nvsMYo5a4txsuBgPGiaQe2dtQY/9tqNDxnvb2ryT4dRZ+DgF/vTLJ21FGTXT3\nYuVXFFeU4TZDw1tCpm/2p80di04PSJrdvYDuhjz3kQ92fTuA6eAJy1EMjFD+\n+jdE\r\n=EHtP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDtt2pK9wEFigTJDJB+IvCRTkBYjJwdBqnWskhVmjTQ7AiAqObBxMfmy2++lOB5z/ZuHMmuxv5oFdQYke+5oqI2amQ=="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.50_1554356124538_0.5968031730358232"},"_hasShrinkwrap":false},"1.0.0-alpha.51":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.51","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.5"},"dependencies":{"regenerator-runtime":"^0.13.2"},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"60cc32d7b04fb3c58ab85eb186a4b3f3aa4fca02","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.51","_npmVersion":"6.5.0","_nodeVersion":"11.7.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-e97Ted+a3XxDEP4TXhfXH9XqPKtY4BoKxq8A9WZObxP7L9vUIdjlyF6aa2f+nZqV2BUq+h0LrEVumjUoqQJifQ==","shasum":"8a60dae5b666dccc4cb91773c8226861bf4808d6","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.51.tgz","fileCount":38,"unpackedSize":572057,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcpZlNCRA9TVsSAnZWagAAEa0P/0fHSGOaC3BtF7DXcXXI\nsvDRbtkmCjY/9v1M6qdzc2uRUQBtR6BMCZDACQ3CzuTB48ooojscH1h5j6KX\nSxOFTUoK4nbZWlgNITOlrkYmLZMxIhWLFZj4PCXksKJSFIorUTun7FnwwyGR\nbFDOAZIRSR0Lmrfrb/2nz4EfgW/Y5wHMA/tORsN2eoNfLD08ijmetEr4wc5n\nSiy9QQinaqMPzYQaMi15LjSCN8GNPO0AFXMh3BaFuqIyQYtuPzGEgi5hXh2q\nC6UmX21xX59a+devH2y97OJdQDVwNNT8IbzuARU5WEi7gSrRnRRKh9atD/tN\nj7vU/vmpeQjGNAC1wE7NsWFC8JaCuQY/uLxG9i6vq43GV1JANo42XuYZGwce\nkTDngb+xnBJEwqQqlS1/5IzZwjSNWfvynHAB70NIIE3MAwKYEp5KQkfHJgNh\nYrWbn1rQ8mBFEYzKL17plQLuLGWOxltiuaYx5VQJ69J3M5lJEOf/wlxf5tKq\n2kxb3iTwtEVb3aV8bdFaH1HAqb4+7bPsv6G2UaGpBZTcJL9ezI5xOppzyHrw\n0Emppz8ALpMNWlDrfPrd76RoBOxAaLRiWHyiMCC7YGANmw/qhoIVEbFu5Uat\nRL5+focwwR/JL3LxsvRRZaYfweHEl5Jko1OhwwriX6Ei/TUgEDysrQVBuNSE\nGyku\r\n=FGsz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC2vM/x/1jBPXVEe3zPvRynppYNvP9yNKtvsMQxDUPN3AiB6c68igaEXtCc08k//SjBKIaxDarX7TJO7Cp5RxYVm4w=="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.51_1554356556923_0.8259952880137258"},"_hasShrinkwrap":false},"1.0.0-alpha.52":{"name":"redux-graphql-subscriptions","version":"1.0.0-alpha.52","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"dist/index.js","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/node":"^7.0.0","@babel/plugin-transform-modules-commonjs":"^7.2.0","@babel/preset-env":"^7.1.6","@babel/preset-flow":"^7.0.0","a":"^2.1.2","babel-core":"^7.0.0-bridge.0","babel-eslint":"9.0.0","babel-jest":"^23.6.0","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-flowtype":"^2.35.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flow-bin":"^0.86.0","flow-typed":"^2.5.1","graphql":"^14.0.2","jest":"^23.6.0"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","build":"mkdir -p dist && babel src/index.js --out-file dist/index.js --source-maps && cp src/index.js.flow dist/index.js.flow","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws-hally9k":">=0.0.1-alpha.5"},"dependencies":{"regenerator-runtime":"^0.13.2"},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"029001b32e46e5abf8bdc2fcd80a809e37a5334d","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@1.0.0-alpha.52","_npmVersion":"6.5.0","_nodeVersion":"11.7.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-vrTVmQ4lqe8/uW5DQwrF85YNc/0yhVX66uMpVptM8REHTFl5XTrFDg3vHOgXj74WnVM/qZG5ho6y513SWezhjw==","shasum":"e5de03dde6ec49376a419f142ed3b977d07eb50c","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-1.0.0-alpha.52.tgz","fileCount":38,"unpackedSize":572279,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcpZu8CRA9TVsSAnZWagAAJ6MQAKLJ5QHBX3/zm60xddp3\nR9aynS0YwIHLqRdBYzJF7WRjBbVuMCwjCNS1JNb4GKyY3z9YEWvjOswAIMhi\nHRzXPq8IZaCLiVRioBJLnGYsl+fyGNhyKD8ziTmCYdM316ypjGgGU8V7SMbC\n2lq6e776hx/AZ82C8rHt8bBBzaToWLiZxk1GU4oYyEDScuNmdysBYdQI7dEc\nWn9FQcZ0NOAlNgRyl3HwMzmA0dZUoqFOwsip+iTQcOZvtTac2AfWYk96cY6I\nkbw+XDaZUdtGmP64j1nBSkWVJMWC1fAcFBq5ceEvBGJTg48tbURPg8tK0IK7\nnOq0mKph1bZXRZM1atzsFxp5na+4P0NdlP5eDJKBpJtYi1XqwDN2WyawDYh3\n7TZ6/YLY8FwHnPcbO4720A1p5z770sEkqdjbzYFM2zm6KLg91EGrH1VtujsG\n+fiDwOdecG5qVrWYn9apXeRYDB5q3OCqvR+GzjWk37qGeOp2u3mu4Qyqdaev\nNqgTPMszmVy7oCaQbpmVeRy+CJnGboY+rfPoU1VGaGL3hpwLFWDRPK47YMOj\nR+omyBBdhvGZb6ub9IOzSZp2CPN9pUgpFu4tThURQCK3FlmDLA8vm5IoOgS7\nAXqGepntK+/jv40THANgwOcvcWOLO7lxWZpz+DUulYufD2nJeXsCHQoqLKIW\nHVX0\r\n=Q9IW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHPkgSgdR3nXPGeuLN66qH3S1TGjIr3dLP6OyFJX/U6NAiB0nzxlJfcjm7p8Q8KI4WsuJcCXgkhiYQ1xkvFahkAySQ=="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_1.0.0-alpha.52_1554357179372_0.1509905000759837"},"_hasShrinkwrap":false},"2.0.0-alpha.1":{"name":"redux-graphql-subscriptions","version":"2.0.0-alpha.1","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions","Typescript"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"lib/index.js","devDependencies":{"@types/graphql":"^14.2.0","@types/jest":"^24.0.11","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flux-standard-action":"^2.1.0","graphql":"^14.0.2","jest":"^23.6.0","redux":"^4.0.1","rollup":"^1.10.0","rollup-plugin-typescript":"^1.0.1","subscriptions-transport-ws":"0.9.16","tslib":"^1.9.3","typescript":"^3.4.3"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","start":"tsc --watch","build":"tsc && cp src/index.js.flow lib/","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws":">=0.9.16"},"dependencies":{"ts-jest":"^24.0.2"},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"804f33de4168365cd3cb979921d81b18271f861b","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@2.0.0-alpha.1","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-dp7b7m6t/PUhYOyr4gVYAEJY/STU5Sht6zXeG+weiiNd6wDFsvjM+uv99pRdHaMpjF6ZD5azVCZESPxf3lVD/Q==","shasum":"f659db580bf02e3a3557015272e50599691bc84d","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-2.0.0-alpha.1.tgz","fileCount":17,"unpackedSize":225652,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctAraCRA9TVsSAnZWagAAhRQP/1STbOjqV7QBmBiXQOvG\ngzPReE0Bm+Y/UR/1yxdx8jS+xq/JPFKpY95FnShn0SijpJGZI2aLTE/s8uOW\nr/RM0STltLQtYTno+mbYeZod0OjzK5HxZkJwMOX++JoUGON48lBZd2kH17SB\nlCEu5rSXenpppIKwNWaS9I1EOcdG5HCkxQLVnK5XTshPHKz9XKHb+oW4vltY\nX80iTFpmmQG1PGkCPE8zbhGjHdTOUUtphz+8N+D+hyO1fNGZBwwYKJI2/irr\nYTMckzYfky2fGpmoZqgQ/IiIJr040H+rdchynzfccHSQeka2urBcjQ1aHM/P\nknYHE2YlgC3QMc2K/KqVgAH8n/ysq9dMU25+r1PDJhaRQB1/Qv6jBJHDXg/C\nY/y3IX6U/9+Cxa2/k2cUo+dtIZ+IOrnkckBfwC37n30w4iyAfAmLaoeLubcN\nP2Fr86xAbbkjWlsCWth4CBwUSnLnRarN9bJT86p4SrECwn3SkNYaDs460pVv\nbpXd7e37LlLWDdNkEi2Au4qrBgI3vP5eYwzs3c/4TY15MsQQXvRrAS4lX4Ij\nSxbycLXdTtzeGiuE5L9tqwmnmXin16KIEujftmtUqtKHdX7vlhtq2AKbfC49\nHec99ME++A+kGINp6FpAWyzmQYfMvYo/4yNj3NV4frv5wJSE8bKz2ke+9TYO\nBvZo\r\n=3SBO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCDh98K9OZDMr0GrahRDWRiRARgJKRrxaZ3Ph2mFJyuOAIhAOYXAJqeWP1npvyCojfAt7xz/vxoKR/GTcz4/pAz1iGu"}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_2.0.0-alpha.1_1555303129697_0.08696172974195093"},"_hasShrinkwrap":false},"2.0.0-alpha.2":{"name":"redux-graphql-subscriptions","version":"2.0.0-alpha.2","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions","Typescript"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"lib/index.js","devDependencies":{"@types/graphql":"^14.2.0","@types/jest":"^24.0.11","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flux-standard-action":"^2.1.0","graphql":"^14.0.2","jest":"^23.6.0","redux":"^4.0.1","rollup":"^1.10.0","rollup-plugin-typescript":"^1.0.1","subscriptions-transport-ws":"0.9.16","tslib":"^1.9.3","typescript":"^3.4.3"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","start":"tsc --watch","build":"tsc && cp src/index.js.flow lib/","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws":">=0.9.16"},"dependencies":{"ts-jest":"^24.0.2"},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"aee6a3b2c716370b33582179b0728b55e5c7f2f5","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@2.0.0-alpha.2","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-7t7ZHt0f8thmaEquhBou3Upbee92kD242mFSbyYfg7Gg6PXhdO4CDcGhmA1vNyCFSzUS17EDe6hEEsga2hA3Mw==","shasum":"785e3ed53da41f139ec7336c79dfa3d4b2cb6f8d","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-2.0.0-alpha.2.tgz","fileCount":17,"unpackedSize":225711,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctA1sCRA9TVsSAnZWagAANQcP+wYxO1ne92V9mrNGKGJ/\n/5CLZLqvFBupy6Ihw//Mt+sm13YO/MLQxiGRrJweeHGJXoCnGdCH0235Mgld\ndylepmqY7+QHad/Qzeogg/Vxk3J2X0AH3qatiKlGjtWBdKmZv4TNiq2cLXLL\nwciPxaSgU0IrdXM4JV1YuS8vdlriL8bZTwNg/5CEiwz9Qyj9Iii+YJSxxGLP\nPLueeaDDKCivkwnEe47xXaHRDOiSrDaUbEqdv/SYhdzjVY1svXDPQUQHM7HN\nrrWg2qNwdsldFfddaNgps1Jw3DYnWMpFl9HHDt3WTiLokQYBoo0ahvvXMnoa\nol3oaPmhU4CMVQi+JGTdDkaHdqLKQxdZ95lLoYDdJDHy/O+Jq5NkgnUaI9jO\n3go5txe3Idxyem8lS/2mufHOpeF1otM8WMY4pIFaJSsckngKMXbhLWk2BfSn\nqvhc90pFh+b/Q3tT39V1QGxUBf2J+El0aJY+DVaPyogZIutKa4eQgCThZhPc\nN26IhI6Ac41e8/3mA9v0BTbkUHYAh+9bAxxSat9hOL519Ny1bo/Ot/CaGggJ\n2Ttlda1EbBHxKJbSZYU6U7WalEb7jLCatHBYGnNSm9Q807Ejfr+ZTjku3Gv2\nkoSRyxkumWHN66x1SayAXAHmHVGN3Qe3qUqs6QVKnu3Q3BKGE46Bf06gVt3z\nIJ9m\r\n=QI+z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDgPKuL7ffHj9EwUnOKA5EwhPnVJw5CNrhreOZrMNBviAiEAucPYJTn/HnMou2euZgIdj7P46keyVwBtTuYH3nfUF00="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_2.0.0-alpha.2_1555303787482_0.4410026656133137"},"_hasShrinkwrap":false},"2.0.0-alpha.3":{"name":"redux-graphql-subscriptions","version":"2.0.0-alpha.3","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions","Typescript"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"lib/index.js","devDependencies":{"@types/graphql":"^14.2.0","@types/jest":"^24.0.11","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flux-standard-action":"^2.1.0","graphql":"^14.0.2","jest":"^23.6.0","redux":"^4.0.1","rollup":"^1.10.0","rollup-plugin-typescript":"^1.0.1","subscriptions-transport-ws":"0.9.16","tslib":"^1.9.3","typescript":"^3.4.3"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","start":"tsc --watch","build":"tsc && cp src/index.js.flow lib/","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws":">=0.9.16"},"dependencies":{"ts-jest":"^24.0.2"},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"6e9d80c8dbf52b78e0ae64de09ce2c9ca9388777","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@2.0.0-alpha.3","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-KOO3I6pQQhPQAxsYXLqoZ5YsnfGbxj4FNk28p5yuDyFhIkhgtwKiH0uFbPpUwPJqlqC7/5fO2ZrKAAXIvfA4AA==","shasum":"eb7059b73868887c4125e37dab50dca01fe62d89","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-2.0.0-alpha.3.tgz","fileCount":17,"unpackedSize":225839,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctBHJCRA9TVsSAnZWagAAaSgP/02IRw2fxZX8PuW6HjeA\nFy4JCiuEZN+Z5f1QwqlIh8mh0kPCZWZ4K6Az3XZCzHm9mSzd9UDNSMPQBRN0\nUezUfKEVHs7qXMyWEP37/rv9uYzoeMQQWk61lDiDHCx/yb2rmtur6p6U75xj\npEtlCxTwY1HuRThZ/OoXgal0CsnD7AH9IhdWLyI69AHGu8M3kWTE/lB3XBtA\n86nxIDHx/0jkwzHk2MByZ4BIkksmDGmomXFEWfGDkshNr1Wgw+h+thqkSUN7\nYXwfo1NR8eXLWEjsgggjTZMuf1zK9C6Vfcfa4kt+mF6VJvguiEmGQHpos9sE\n3Vvjg7IVu8xM2FJZRAD+RMQL1dxk+6Y55a3ALBiHAzNK3BnOihfizwpxCujz\nFoAEG9CB6uC8jniIbzq6B/GHDhTRdKzEbHBgH5sR1Z4gJ+JTBt4/dgl55rqN\n+BHGNHzl7sx4mf0gb3UvMm0jyLfYLp10/YH0y0dKgfJJsJyCNn9YvIwvctmm\nyrOCpvibB2U5rvt1FMYxMjux0S6MNawGhFgeL0PJKhCSokEsCAHKkg7Q4LPs\nQmBt7EJ5pzo70QRSZTyjlEWcqGLiiBzD9kxdUJbINyVZgH3oKLJ/K8DAAccq\n0XfB2xnYmeNGaHGh51d0o8dpI3kYAz39e9V/w3IhJtXteBDp0OdfS2n7Smtc\n6xzB\r\n=iHmM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBPv7r800YJe5D4ChpoWMgHOHm/R3MjHbu663+xPfOYnAiEAqz/s/xG/Zngpmz8b+iKfkZoL3gE1+BHaSAOlbrka6QA="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_2.0.0-alpha.3_1555304905268_0.8794536620220987"},"_hasShrinkwrap":false},"2.0.0-alpha.4":{"name":"redux-graphql-subscriptions","version":"2.0.0-alpha.4","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions","Typescript"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"lib/index.js","devDependencies":{"@types/graphql":"^14.2.0","@types/jest":"^24.0.11","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flux-standard-action":"^2.1.0","graphql":"^14.0.2","jest":"^23.6.0","redux":"^4.0.1","rollup":"^1.10.0","rollup-plugin-typescript":"^1.0.1","subscriptions-transport-ws":"0.9.16","tslib":"^1.9.3","typescript":"^3.4.3"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","start":"tsc --watch","build":"tsc && cp src/index.js.flow lib/","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0","subscriptions-transport-ws":">=0.9.16"},"dependencies":{"ts-jest":"^24.0.2"},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"c7d32846daaeecd025fa1c29ac6a7d3928291c84","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@2.0.0-alpha.4","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-ILV9jUS/IA6791GFm/Wc54R0Gk237RXJCrW8ejHAGUhcFaHLK7BjKyYcubJJAvvQunT8kkSiUopc4SUKtAy7ug==","shasum":"75bc10ee970f696a8e1a573d3a84c87125ac3925","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-2.0.0-alpha.4.tgz","fileCount":17,"unpackedSize":226972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctBZLCRA9TVsSAnZWagAA178P/RTxMw+r6nxpVT0W64xY\n4C7feYqRhJvPWuEgaMezfrKobRDxff+mR3M9Vh0qNSPFsuNRmPgtjepO3Op/\nPIE13Xohm4+6Exv+5m+YCTAPkEz7UQ7kAJpJq6e44TowUCitJDJE2/tceb6f\npoV46i3BcKoErEclgou/+q6y3q+oHTiEdf4y3p7pwn3TUcUTlTzb3Z2rWR1E\ngVguzv2N7JlDiDNnfre1a8AdnipzgY+9cAjj8JiYvaMQDqEa11ovlrwdLq0D\nECJ7H+P+RYcau6V4iR0sQJQTrtKhLawo5oBKixiFaDTbl6mrATO47RFJwusL\n8DiVxsiebBqTuK6Bq/iP3IZdBfiDN6cjIgeFh3BcvkYVcdXlh4r41cu0Sk04\nVLFiUX+AC/FXY66FfqpjwnnqCFqYqq5lKMEHXD7nHm+tYqieh9EM5s7zG2/Y\n8HESdM1XckUehpSRbRWB19VN1z7+xDqPfsb9XjgjOMzTxE4QG9kDLWE105QG\nXooS6xNkPaUugKb8KxE4Wb4i8NoL+LDJMqCdqnm/WW6ae3B118ZpKvGTAhZo\npG00MBEpcsM0sdAul5VF+7c14wptFvRL48hQLahra6ixrFFilKb2RYugjEKG\nE6IlY3xN4Kup6+6G+TqIRj3kv6ynmdNxlgy/A/wUyUc77XkTa3NN0dIV4f9G\nwBq0\r\n=XZyL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFDHtWsSDbrDbNNOTTgK3qsDHWudaqIwrMBNre5D6SHGAiAVHPY7/h57S3JR4qi2lR6phHYiWdMNaBjSxZuJiUt5dg=="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_2.0.0-alpha.4_1555306058651_0.09304579247916833"},"_hasShrinkwrap":false},"2.0.0-alpha.5":{"name":"redux-graphql-subscriptions","version":"2.0.0-alpha.5","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions","Typescript"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"lib/index.js","devDependencies":{"@types/graphql":"^14.2.0","@types/jest":"^24.0.11","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flux-standard-action":"^2.1.0","graphql":"^14.0.2","jest":"^23.6.0","redux":"^4.0.1","rollup":"^1.10.0","rollup-plugin-typescript":"^1.0.1","ts-jest":"^24.0.2","tslib":"^1.9.3","typescript":"^3.4.3"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","start":"tsc --watch","build":"tsc && cp src/index.js.flow lib/","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0"},"dependencies":{"subscriptions-transport-ws":"^0.9.16"},"typings":"lib/index.d.ts","typescript":{"definition":"lib/index.d.ts"},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"c9c30a62eaaccecd372e58f9bbec4510b943e89b","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@2.0.0-alpha.5","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-vddAHX+oihDR3okheJrqNr/12CDO8sXEd9/dX357sr1/W7c89iS9H1upAXHjmlvy012Lr67via23MIyVzs8aAQ==","shasum":"045b98fd7f12c9d7f145f0d7efcbce3b56a8ef22","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-2.0.0-alpha.5.tgz","fileCount":17,"unpackedSize":227088,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctQZuCRA9TVsSAnZWagAAxdgP/Awl/Wx8RqJpXSYaBzUE\noBOOBbds4Yah99VZSUuPSe7bFEjSKdBc2LoJJY25iLOc7YKDIEro0Gvd/Aoe\nsn4ofiUGUy81hfI1YpojcmmMWztqdjcDA6Ix1a+fa2YBabT0PuBw6M12AkLn\nK78dwTpAVM0/lNG/8g65Cr1ia4pMRMKAmViGKwddCCaa8+DgPhEbcFGAavkS\noMbPdLX9IwHwYb5b9/xNjObRk0Bqycvai9Z8dqC56YSrL6D3NGe7QlRQL8k2\n7lQO3peQ19/b6+2CfNfwk2ajuQTr/8y4plSxOVCJ8J8dcrY+o9H+4ZqYPBd0\n4JUG/cjcM1Nkcmn9aihyARohb2D0Pm7Su/8m8V6gez2s4BlcKKe+OI4k2DWA\nyIT0Fy5Jm5RsF34pCbpzL45EGNn3OpsO91gfufq9eHWlbYuXPOjGziEwi4wZ\nIOzroOZ/RNTPavOCc9z04qaaGLAvbg2inmfh+wZXuHyCJUl119lwZ2gU8RjF\nxUqWnXzUddzx8bqErcETajpVX1X/K0Ldkt6SL0MTU7ygIm7vKm/KgReGM9Qf\nzJ9xGSDR2Tlu1BQSP1PaWBrqsjVlpdTUSddnFCbh4qenmUUVbBe8I2pmJLXj\naphwq/3j09uzOCtXHLggYIIAEpe5iXn6Vdge2zOq1avrZ8p2fztBuxM+gZ27\nKLLQ\r\n=bpW2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDx40UmqGEDf2Fk1i2ZNE7I8PyiFvVo3mFZS3vmuX5AQIhAIxfTzGd9lnDHkeNlIScUnBZgU/07lUbOaq/ZKkC/OO+"}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_2.0.0-alpha.5_1555367533472_0.9822570675601838"},"_hasShrinkwrap":false},"2.0.0-alpha.6":{"name":"redux-graphql-subscriptions","version":"2.0.0-alpha.6","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions","Typescript"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"lib/index.js","devDependencies":{"@types/graphql":"^14.2.0","@types/jest":"^24.0.11","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flux-standard-action":"^2.1.0","graphql":"^14.0.2","jest":"^23.6.0","redux":"^4.0.1","rollup":"^1.10.0","rollup-plugin-typescript":"^1.0.1","ts-jest":"^24.0.2","tslib":"^1.9.3","typescript":"^3.4.3"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","start":"tsc --watch","build":"tsc && cp src/index.js.flow lib/","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0"},"dependencies":{"subscriptions-transport-ws":"^0.9.16"},"typings":"lib/index.d.ts","typescript":{"definition":"lib/index.d.ts"},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"8c6d167eb6af4afe10f52b414df83afce7c1ed5a","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@2.0.0-alpha.6","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-HjYMQY0i2bDyk5gwFtDy7ajNf+1qTPINg8TNKtdOXQpPYaWpoFxHSRqbhF9ixV4mkP72k/c8bbiIqrfNnzMVEg==","shasum":"2fa38b13e9cb62b970917b38677d207d73f45076","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-2.0.0-alpha.6.tgz","fileCount":17,"unpackedSize":227197,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctoGlCRA9TVsSAnZWagAAo2oP/jZ1h/RpIOHmNFPFcBrw\n4ANKlyioEz11uoGI8HF/AW+SpEXzapD6s68M+D0S1ykqZ4tnIQ7cdjMlhrZf\nn2gWN77EPOwVidZ57tM5bys+grvwD1kAoMCUKxScRZ3O0nTPq+NDJZidnS8r\nXlegOW4uwLRgt+/kVgD8EXR7kXqV3l4dlBb9n4nfpDZEPXbHJmG1+1TJf1fn\nEmt3bzqonMTHC6D+Qsu1u8X5Ht06rrRKBh6xsuwswBzNo7Rx81tzcihr+wA1\nZaMCbgjfAc3jlEqZhEJHBYd31LdUrex+bwkSIQ/m/uGbFmtCsy8e9rX2FAen\n46AP7tP70raF/CbtTBM44sFqc/O+Vw2rtOFgQvWlBgqbXmXtpRkwsaGojFtJ\nSDuTIZqc8shF5eYecwklRB2OnurKCL7E29K0x8OFCcyr0R8dBZModkpHrarT\nkIw+qcS5ComSB8xm9AJxTJR0S5kO2vfyJXuE/FdUj15XF7QSPi1dTOUx7160\nRa/hmrE4pI2+U+yhyDurM6Wz7Djgnidd15nUSRK3pFg8+zQqAn25gmW6skfp\nQZPdygpOT5eNIlW+LVv7kr6CwLWN4sRMfpNHNH2PJPAw+ZW0IwINB5h3lFVt\nfxX9HeEn8GnvW/+7JDcfJzhFNQGor9Ie8XDxhkJB5nEZA5GHWr53/nKzEcUn\n5dB7\r\n=xLh9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH7bG2Q9mgu6DHaakXwSYpDWRcttNgNyX+W2Kvo7r6oVAiBqRr2OiAcpyM/8mUYcxpkGHABbL79Dv4Nhw4rQiq5WCQ=="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_2.0.0-alpha.6_1555464612273_0.11292166823994987"},"_hasShrinkwrap":false},"2.0.0-alpha.7":{"name":"redux-graphql-subscriptions","version":"2.0.0-alpha.7","description":"A Redux middleware for managing GraphQL Subscriptions.","repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"keywords":["Redux","GraphQL","Subscriptions","Typescript"],"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","main":"lib/index.js","devDependencies":{"@types/graphql":"^14.2.0","@types/jest":"^24.0.11","eslint":"5.6.0","eslint-plugin-babel":"^4.1.1","eslint-plugin-compat":"^2.0.1","eslint-plugin-filenames":"^1.2.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jest":"^22.1.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.1.0","flux-standard-action":"^2.1.0","graphql":"^14.0.2","jest":"^23.6.0","redux":"^4.0.1","rollup":"^1.10.0","rollup-plugin-typescript":"^1.0.1","ts-jest":"^24.0.2","tslib":"^1.9.3","typescript":"^3.4.3"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","test:debug":"node --inspect ./node_modules/.bin/jest --watch --runInBand","start":"tsc --watch","build":"tsc && cp src/index.js.flow lib/","prepublish":"yarn build"},"peerDependencies":{"graphql":"^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2","redux":">=3.7.0"},"dependencies":{"subscriptions-transport-ws":"^0.9.16"},"typings":"lib/index.d.ts","typescript":{"definition":"lib/index.d.ts"},"readme":"# redux-graphql-subscriptions\n\nA Redux middleware for handling GraphQL subscriptions.\n\nThis repo leverages [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) which is the awesome work of the Apollo guys [over here](https://github.com/apollographql) and is intended to be coupled with a backend server that also uses subscriptions-transport-ws or conforms to the [same protocol](https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md).\n\nThis is totally work in progress so all comment, critique and help welcomed!\n\n## Getting Started\n\n- Import the package `yarn add redux-graphql-subscriptions`\n- Instantiate the middleware, passing in the url of your websocket server.\n- Pass the middleware instance into your redux store.\n\n```\nimport { createStore, combineReducers, applyMiddleware } from 'redux'\nimport reducers from 'reducers'\nimport { createMiddleware } from 'redux-graphql-subscriptions'\n\nconst graphQLSubscriptionsMiddleware = createMiddleware('ws://localhost:8001/subscriptions', { reconnect: true })\n\nlet todoApp = combineReducers(reducers)\nlet store = createStore(\n  todoApp,\n  applyMiddleware(logger, graphQLSubscriptionsMiddleware)\n)\n```\n\n- Import the subscribe and unsubscribe functions and use them in action creators.\n\n```\nimport { subscribe, unsubscribe } from 'redux-graphql-subscriptions'\n\nexport const subscribeToNewComments = () => subscribe({ ...newComment, { channel: 'one' } })\nexport const unsubscribeFromNewComments = () => unsubscribe('one')\n\n// Subscription object\nconst newComment = {\n    query: newCommentSubscription,\n    onMessage: receivedNewComment,\n    onError: receivedNewCommentWithErrors,\n    onUnsubscribe: threadClosed\n}\n```\n\n## Working Example\n\nClone the repo and boot up the working example to see how to integrate it into your app:\n\n- `git clone git@github.com:hally9k/redux-graphql-subscriptions.git`\n\nRun the server:\n\n- `cd example/server`\n- `yarn`\n- `yarn start`\n- `cd ../..` _(Back to the root for the next step)_\n\nRun the client:\n\n- `yarn`\n- `yarn link`\n- `cd example/client`\n- `yarn`\n- `yarn link \"redux-graphql-subscriptions\"`\n- `yarn start`\n\nOnce you have the app running make a subscription and test the automatic reconnections by killing and standing up the server.\n\n## API\n\n### `createMiddleware(url, options)`\n\n- `url: string` : url that the client will connect to, starts with `ws://` or `wss://`\n- `options?: Object` : optional, object to modify default client behavior\n  - `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 10000 ms), this parameter is ignored if the server does not send keep-alive messages. This will also be used to calculate the max connection time per connect/reconnect\n  - `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization\n  - `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value\n  - `reconnect?: boolean` : automatic reconnect in case of connection error\n  - `reconnectionAttempts?: number` : how many reconnect attempts\n  - `connectionCallback?: (error) => {}` : optional, callback that called after the first init message, with the error (if there is one)\n\n### `subscribe(subscription)`\n\n- `subscription: Object` : the required fields for a subscription\n  - `query: string` : GraphQL subscription\n  - `variables?: Object` : GraphQL subscription variables, requires `channel` value to be set to denote the channel to listen to.\n  - `onMessage: function` : The action creator to be dispatched when a message is received without any errors\n  - `onError: function` : The action creator to be dispatched when a message is received that does contain errors\n  - `onUnsubscribe: function` : The action creator to be dispatched when the client unsubscribes form a subscription\n\n### `unsubscribe(channel)`\n\n- `channel: string` : channel to unsubscribe from\n","readmeFilename":"README.md","gitHead":"65df9001c24d27f287e21c98234a441229e476e2","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"},"homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","_id":"redux-graphql-subscriptions@2.0.0-alpha.7","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"hally9k","email":"hally9k@gmail.com"},"dist":{"integrity":"sha512-AKiR8boo7PiVP34aqgofumUAqtgedDPt2tQ2dDdad++HPzHpOqKVLa7wiJ7DqJbK5Av3Hs4CbG+XZBbqljYE5Q==","shasum":"9fc1b46a6c68494326c73693f96f84f5a3ef6a72","tarball":"https://registry.npmjs.org/redux-graphql-subscriptions/-/redux-graphql-subscriptions-2.0.0-alpha.7.tgz","fileCount":17,"unpackedSize":228202,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJct/G0CRA9TVsSAnZWagAA120QAINog7AaXuA4tVQqyM1Z\n2rY0pmQ6HEDgmWt9mJ+FC79U0Ekh+lvBugKtpaaXB7UsoxMk9pnkmU2tsbVW\natbKl/D8c7fnTnQ7UnQyVQveQL3HvZQSvXRlDiRjZZxGa3RR+RtvF04kwllh\nar7jB2niqqd1zKdC+V7cYHENWuPv57OVON0VOwGXTzKpkfVQY6zd03W511U4\nKBeBaw5R9YEHr7p+hW7TFQcP3lyoeX1QkkPCRvnJQvA6ZbcYoJzCySpAm8gu\n640uH4Pc4OgBC1AmdJoQ840jCVevIA7Mhv9wD9n4eM7LqAzqWb15dbZB2giw\nbyTb6tvR2Kz1Dw1dNSBnQl4DWCFEaCvhzfieBkMxJ2zxR1aXCoK8QMRNC4A8\nVOBcivZXxrMlje87WNd4GtCLjwh3QGDz234qqLvV6L90n9tZOLOve4QFOhTt\nLLys3jVQkxQNHokPy8H3FqDRpvIBcRcx4iOdo7g10r/zU05aJ1/l1X1T+LSx\noEke/PDJh2+JnQ47xDACnoTtlF7YDa1Eolty/uX8FJeT5jTOSLU6SscZ+o02\nZtylBqH4R6dlEix1OeMYNdSn+Ofw1ew7uOzusT/Sj3JvldXIMFT5t2QwR0Ze\nM941kB6UOnvE05JeMaSJNCWmcQxn0xqRrQTh3zM90bgZs2APl+blkHaezlPa\nSyg2\r\n=H3N3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnvJ5OENCALh07WDoRw5xVNtgIsrywBq4a6ej8LQqiTAIgX2BlR4z8qmO3EPIUX3N4ll2MrCVqr5oUTLvpESuvq64="}]},"maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/redux-graphql-subscriptions_2.0.0-alpha.7_1555558835771_0.9194120306482931"},"_hasShrinkwrap":false}},"readme":"","maintainers":[{"name":"hally9k","email":"hally9k@gmail.com"}],"time":{"modified":"2022-05-15T15:21:25.356Z","created":"2017-08-13T07:40:04.528Z","0.0.1":"2017-08-13T07:40:04.528Z","0.0.2":"2017-08-13T09:44:08.237Z","0.0.3":"2017-08-13T23:25:59.074Z","0.0.4":"2017-08-14T03:16:37.420Z","0.0.5":"2017-09-05T12:56:41.233Z","0.0.6":"2017-09-20T08:19:45.390Z","0.0.7":"2017-09-20T08:24:00.768Z","0.0.8":"2017-09-20T22:21:11.300Z","0.0.9":"2017-09-22T02:58:08.054Z","1.0.0-alpha.1":"2018-11-29T01:50:47.693Z","1.0.0-alpha.2":"2018-11-29T02:02:55.732Z","1.0.0-alpha.4":"2018-12-06T02:15:38.406Z","1.0.0-alpha.5":"2018-12-06T02:20:22.755Z","1.0.0-alpha.6":"2018-12-06T02:25:59.874Z","1.0.0-alpha.7":"2018-12-06T02:32:48.627Z","1.0.0-alpha.8":"2018-12-06T02:57:42.385Z","1.0.0-alpha.9":"2018-12-06T21:54:10.493Z","1.0.0-alpha.10":"2018-12-06T21:58:37.153Z","1.0.0-alpha.11":"2018-12-07T01:53:30.418Z","1.0.0-alpha.12":"2018-12-07T05:32:31.080Z","1.0.0-alpha.13":"2018-12-07T06:04:01.582Z","1.0.0-alpha.14":"2018-12-07T06:06:39.443Z","1.0.0-alpha.15":"2018-12-07T06:09:53.909Z","1.0.0-alpha.16":"2018-12-09T21:50:53.636Z","1.0.0-alpha.17":"2018-12-09T21:51:19.075Z","1.0.0-alpha.19":"2018-12-09T22:37:50.181Z","1.0.0-alpha.20":"2018-12-09T22:46:15.684Z","1.0.0-alpha.21":"2018-12-09T22:50:21.578Z","1.0.0-alpha.22":"2018-12-09T22:55:41.340Z","1.0.0-alpha.23":"2018-12-09T23:05:49.959Z","1.0.0-alpha.24":"2018-12-10T01:43:15.993Z","1.0.0-alpha.25":"2018-12-10T02:04:29.587Z","1.0.0-alpha.26":"2018-12-10T02:07:52.818Z","1.0.0-alpha.27":"2018-12-10T05:01:27.528Z","1.0.0-alpha.28":"2018-12-10T05:24:43.350Z","1.0.0-alpha.29":"2018-12-10T05:27:49.194Z","1.0.0-alpha.30":"2018-12-11T04:55:48.747Z","1.0.0-alpha.31":"2019-01-10T00:22:33.986Z","1.0.0-alpha.32":"2019-01-10T02:42:03.700Z","1.0.0-alpha.33":"2019-01-11T00:41:22.651Z","1.0.0-alpha.34":"2019-01-11T03:38:46.358Z","1.0.0-alpha.35":"2019-01-11T03:59:58.415Z","1.0.0-alpha.36":"2019-01-11T04:09:34.133Z","1.0.0-alpha.37":"2019-01-11T04:30:34.564Z","1.0.0-alpha.38":"2019-01-15T00:44:08.789Z","1.0.0-alpha.39":"2019-01-22T03:15:57.147Z","1.0.0-alpha.40":"2019-02-07T01:49:01.896Z","1.0.0-alpha.41":"2019-02-07T03:14:54.165Z","1.0.0-alpha.42":"2019-02-07T03:23:00.277Z","1.0.0-alpha.43":"2019-04-01T03:42:07.823Z","1.0.0-alpha.44":"2019-04-01T03:51:50.950Z","1.0.0-alpha.45":"2019-04-01T03:55:35.613Z","1.0.0-alpha.46":"2019-04-01T04:09:18.593Z","1.0.0-alpha.47":"2019-04-02T22:29:51.387Z","1.0.0-alpha.48":"2019-04-02T22:37:18.514Z","1.0.0-alpha.49":"2019-04-02T22:41:28.515Z","1.0.0-alpha.50":"2019-04-04T05:35:24.659Z","1.0.0-alpha.51":"2019-04-04T05:42:37.207Z","1.0.0-alpha.52":"2019-04-04T05:52:59.586Z","2.0.0-alpha.1":"2019-04-15T04:38:49.877Z","2.0.0-alpha.2":"2019-04-15T04:49:47.605Z","2.0.0-alpha.3":"2019-04-15T05:08:25.426Z","2.0.0-alpha.4":"2019-04-15T05:27:38.856Z","2.0.0-alpha.5":"2019-04-15T22:32:13.586Z","2.0.0-alpha.6":"2019-04-17T01:30:12.445Z","2.0.0-alpha.7":"2019-04-18T03:40:35.952Z"},"keywords":["Redux","GraphQL","Subscriptions"],"repository":{"type":"git","url":"git+https://github.com/hally9k/redux-graphql-subscriptions.git"},"author":{"name":"Hal Smith Stevens","email":"hally9k@gmail.com","url":"https://github.com/hally9k"},"license":"MIT","readmeFilename":"","homepage":"https://github.com/hally9k/redux-graphql-subscriptions#readme","bugs":{"url":"https://github.com/hally9k/redux-graphql-subscriptions/issues"}}