{"name":"apollo-link-ws","version":"0.3.2","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":"./dist/src/bundle.umd.js","module":"./dist/src/webSocketLink.js","jsnext:main":"./dist/src/webSocketLink.js","typings":"./dist/src/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":{"pretest":"npm run build-test","test":"npm run test-only --","posttest":"npm run lint","test-only":"mocha --reporter spec --full-trace dist/tests/tests.js","test-watch":"mocha --reporter spec --full-trace dist/tests/tests.js --watch","coverage":"istanbul cover ./node_modules/mocha/bin/_mocha -- --reporter dot --full-trace dist/tests/tests.js","postcoverage":"remap-istanbul --input coverage/coverage.json --type lcovonly --output coverage/lcov.info","lint":"tslint --type-check -p tsconfig.test.json src/*.ts && tslint --type-check -p tsconfig.test.json tests/*.ts","prebuild":"npm run clean:dist","build":"tsc -p .","build-test":"tsc -p tsconfig.test.json","postbuild":"npm run bundle","postbuild-test":"npm run bundle","bundle":"rollup -c","watch":"tsc -w -p .","clean":"npm run clean:dist && npm run clean:coverage","clean:dist":"rimraf dist/*","clean:coverage":"rimraf coverage/*","prepublishOnly":"npm run clean && npm run build"},"dependencies":{"apollo-link-core":"^0.5.2","subscriptions-transport-ws":"^0.8.2"},"devDependencies":{"@types/chai":"4.0.4","@types/chai-as-promised":"0.0.31","@types/graphql":"0.10.2","@types/mocha":"2.2.42","@types/sinon":"2.3.3","chai":"4.1.1","chai-as-promised":"7.1.1","fetch-mock":"5.12.2","graphql-tag":"2.4.2","infuse.js":"2.0.2","istanbul":"0.4.5","lodash":"4.17.4","mocha":"3.5.0","remap-istanbul":"0.9.5","rimraf":"2.6.1","rollup":"^0.45.2","sinon":"3.2.0","source-map-support":"0.4.16","tslint":"5.7.0","typescript":"2.5.1"},"_id":"apollo-link-ws@0.3.2","_npmVersion":"5.4.0","_nodeVersion":"8.1.2","_npmUser":{"name":"jbaxleyiii","email":"james@meteor.com"},"dist":{"integrity":"sha512-CopnVo337BcDD2sOxUpQqHrF+hNfh5/mk4Fut3RN3apl69YIHjWCaWsy37p5wB4IyiXz18joODoxxxL6l+uN3g==","shasum":"ed2d0c3b55f1797c323db744b2b7692dabd1dc71","tarball":"http://registry-npm.ywwl.com/apollo-link-ws/download/apollo-link-ws-0.3.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDcA2l/g21FhoXnOOpK1dXqNIpkW2wSofMfYmsUlxl4QIge1NoOxv98modizhkA+22T7QJRx0SnlVkpJOorpKXQgk="}],"size":4274,"noattachment":false,"key":"/apollo-link-ws/-/apollo-link-ws-0.3.2.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.3.2.tgz_1504746207915_0.5622653951868415"},"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":1504746208832,"_cnpm_publish_time":1504746208832,"dist-tags":{"beta":"2.0.0-beta.0","latest":"1.0.20"}}