{"name":"apollo-link-ws","version":"0.5.0","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/webSocketLink.js","jsnext:main":"./lib/webSocketLink.js","typings":"./lib/webSocketLink.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/*","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 ."},"dependencies":{"subscriptions-transport-ws":"^0.9.0"},"peerDependencies":{"apollo-link":"^0.7.0"},"devDependencies":{"@types/graphql":"0.11.4","@types/jest":"21.1.1","apollo-link":"^0.7.0","browserify":"14.4.0","graphql":"0.11.6","graphql-tag":"2.4.2","jest":"21.2.1","rimraf":"2.6.1","rollup":"0.45.2","ts-jest":"21.0.1","tslint":"5.7.0","typescript":"2.5.1","uglify-js":"3.1.3"},"jest":{"transform":{".(ts|tsx)":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"testRegex":"(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$","moduleFileExtensions":["ts","tsx","js","json"]},"_id":"apollo-link-ws@0.5.0","_npmVersion":"5.4.2","_nodeVersion":"8.1.2","_npmUser":{"name":"jbaxleyiii","email":"james@meteor.com"},"dist":{"integrity":"sha512-rQd+YK6u2Yevt+mIhO28Eh38DpJuh71RKRwda232rfjcSCBo++iyMG7aP+zOh/YhSdZEJQKycfj4ZSmqxsmYVQ==","shasum":"02a754db9a2433d59bf9078841164053e75021c1","tarball":"http://registry-npm.ywwl.com/apollo-link-ws/download/apollo-link-ws-0.5.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDJMsCPbIDxp3po3m3g3x/+RZXQ8p8YEds2WHxH/uk+IwIhAK4ceDPCQePt5ZN2HWTWJDzxLrbKWg7rbW5slYSz+NnD"}],"size":4464,"noattachment":false,"key":"/apollo-link-ws/-/apollo-link-ws-0.5.0.tgz"},"maintainers":[{"name":"evanshauser","email":"evanshauser@gmail.com"},{"name":"jbaxleyiii","email":"james@meteor.com"},{"name":"mdg","email":"npm@meteor.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/apollo-link-ws-0.5.0.tgz_1507038139847_0.8426054997835308"},"directories":{},"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":1507038140784,"_cnpm_publish_time":1507038140784,"dist-tags":{"beta":"2.0.0-beta.0","latest":"1.0.20"}}