{"name":"apollo-link-ws","version":"1.0.7","description":"WebSocket transport layer for GraphQL","author":{"name":"Evans Hauser","email":"evanshauser@gmail.com"},"contributors":[{"name":"James Baxley","email":"james@meteor.com"},{"name":"Jonas Helfer","email":"jonas@helfer.email"},{"name":"jon wong","email":"j@jnwng.com"},{"name":"Sashko Stubailo","email":"sashko@stubailo.com"}],"license":"MIT","main":"./lib/bundle.umd.js","module":"./lib/index.js","jsnext:main":"./lib/index.js","typings":"./lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/apollographql/apollo-link.git"},"bugs":{"url":"https://github.com/apollographql/apollo-link/issues"},"homepage":"https://github.com/apollographql/apollo-link#readme","scripts":{"build:browser":"browserify ./lib/bundle.umd.js -o=./lib/bundle.js --i apollo-link && npm run minify:browser","build":"tsc -p .","bundle":"rollup -c","clean":"rimraf lib/* && rimraf coverage/*","coverage":"jest --coverage","filesize":"npm run build && npm run build:browser","lint":"tslint --type-check -p tsconfig.json -c ../../tslint.json src/*.ts","minify:browser":"uglifyjs -c -m -o ./lib/bundle.min.js -- ./lib/bundle.js","postbuild":"npm run bundle","prebuild":"npm run clean","prepublishOnly":"npm run clean && npm run build","test":"jest","watch":"tsc -w -p . & rollup -c -w"},"dependencies":{"apollo-link":"^1.2.1"},"peerDependencies":{"subscriptions-transport-ws":"^0.9.0"},"devDependencies":{"@types/graphql":"0.12.4","@types/jest":"21.1.10","browserify":"16.1.0","graphql":"0.13.1","graphql-tag":"2.7.3","jest":"21.2.1","rimraf":"2.6.1","rollup":"0.56.2","subscriptions-transport-ws":"0.9.5","ts-jest":"21.2.4","tslint":"5.9.1","typescript":"2.7.2","uglify-js":"3.3.11"},"jest":{"transform":{".(ts|tsx)":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$","moduleFileExtensions":["ts","tsx","js","json"],"mapCoverage":true},"_id":"apollo-link-ws@1.0.7","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"evanshauser","email":"evanshauser@gmail.com"},"dist":{"integrity":"sha512-Ky2/zQuA/UwdORKBVMnYaogB5L9u9HFtCuJNmfeF5F+VBocYLa5v5gaCgo3v1o/6hwXy0HuU/KPRYu3wyUsrtQ==","shasum":"6cc3903cbfbbefe213ea9fc8121f5fed3cef1823","tarball":"http://registry-npm.ywwl.com/apollo-link-ws/download/apollo-link-ws-1.0.7.tgz","fileCount":27,"unpackedSize":31220,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCTov4UkSEo00DRMun4e7+EdMLKVU0PVSYGdIcGd+MBkQIhAJUAZaU4Y/VgLV9XrZXPv4VZ/nNFTpbr1W3Fq+rMmWch"}],"size":6888,"noattachment":false,"key":"/apollo-link-ws/-/apollo-link-ws-1.0.7.tgz"},"maintainers":[{"name":"evanshauser","email":"evanshauser@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"mdg","email":"npm@meteor.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/apollo-link-ws_1.0.7_1519351283132_0.3012452513882793"},"_hasShrinkwrap":false,"readme":"---\ntitle: apollo-link-ws\ndescription: Send GraphQL operations over a WebSocket. Works with GraphQL Subscriptions.\n---\n\nThis link is particularly useful to use GraphQL Subscriptions, but it will also allow you to send GraphQL queries and mutations over WebSockets as well.\n\n```js\nimport { WebSocketLink } from \"apollo-link-ws\";\nimport { SubscriptionClient } from \"subscriptions-transport-ws\";\n\nconst GRAPHQL_ENDPOINT = \"ws://localhost:3000/graphql\";\n\nconst client = new SubscriptionClient(GRAPHQL_ENDPOINT, {\n  reconnect: true\n});\n\nconst link = new WebSocketLink(client);\n```\n\n## Options\n\nWS Link takes either a subscription client or an object with three options on it to customize the behavior of the link. Takes the following possible keys in the configuration object:\n\n* `uri`: a string endpoint to connect to\n* `options`: a set of options to pass to a new Subscription Client\n* `webSocketImpl`: a custom WebSocket implementation\n\nBy default, this link uses the [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws) library for the transport.\n","publish_time":1519351283198,"_cnpm_publish_time":1519351283198,"dist-tags":{"beta":"2.0.0-beta.0","latest":"1.0.20"}}