{"name":"apollo-link-ws","version":"0.3.4","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/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":{"pretest":"npm run build","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/.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.json src/*.ts && tslint --type-check -p tsconfig.json tests/*.ts","prebuild":"npm run clean:dist","build":"tsc -p .","postbuild":"cp -R ./dist/src/. ./lib","watch":"tsc -w -p .","clean":"npm run clean:dist && npm run clean:coverage","clean:dist":"rimraf dist/* && rimraf lib/*","clean:coverage":"rimraf coverage/*","prepublishOnly":"npm run clean && npm run build"},"dependencies":{"apollo-link-core":"^0.5.4","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","sinon":"3.2.0","source-map-support":"0.4.16","tslint":"5.7.0","typescript":"2.5.1"},"_id":"apollo-link-ws@0.3.4","_npmVersion":"5.4.0","_nodeVersion":"8.1.2","_npmUser":{"name":"jbaxleyiii","email":"james@meteor.com"},"dist":{"integrity":"sha512-KgHxsX783JyDxzHRPf/WntLaKvBdJOwBh7MSgOhnjpLhZlAWXPin2d4ZJ0MeG61Ego8jVPIOjTXrGuPHF90nzg==","shasum":"68860b8a9283df33d75a14c87e04a81d764244bd","tarball":"http://registry-npm.ywwl.com/apollo-link-ws/download/apollo-link-ws-0.3.4.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC4OQYGojL40B/q8F7MZy3DSj1Npygfu5L9KPQCassJfAIgNm6ox35sQSQf40VQ7GZteCCnHS8zVUGMPvvcMuaY8Ao="}],"size":4754,"noattachment":false,"key":"/apollo-link-ws/-/apollo-link-ws-0.3.4.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.4.tgz_1504754118006_0.858073707902804"},"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":1504754118898,"_cnpm_publish_time":1504754118898,"dist-tags":{"beta":"2.0.0-beta.0","latest":"1.0.20"}}