{"name":"apollo-link-ws","version":"0.3.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/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.0","subscriptions-transport-ws":"^0.8.2"},"devDependencies":{"@types/chai":"^4.0.0","@types/chai-as-promised":"0.0.31","@types/graphql":"~0.10.2","@types/mocha":"^2.2.31","@types/sinon":"^2.3.2","chai":"^4.0.2","chai-as-promised":"^7.0.0","fetch-mock":"^5.11.0","graphql-tag":"^2.2.2","infuse.js":"^2.0.2","istanbul":"^0.4.4","lodash":"^4.17.4","mocha":"^3.2.0","remap-istanbul":"^0.9.0","rimraf":"^2.5.4","sinon":"^2.3.4","source-map-support":"^0.4.5","tslint":"^5.0.0","typescript":"^2.2.1"},"_id":"apollo-link-ws@0.3.0","_shasum":"57eda65e45f2a24e4d5f4b549d7e101933625341","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.0","_npmUser":{"name":"evanshauser","email":"evanshauser@gmail.com"},"dist":{"shasum":"57eda65e45f2a24e4d5f4b549d7e101933625341","tarball":"http://registry-npm.ywwl.com/apollo-link-ws/download/apollo-link-ws-0.3.0.tgz","integrity":"sha512-VAVLBktXEVtlcbppegD2sWJ5QmDsZJCOeE2o3h8fePIQBPyOBKQW0LZzhAp8mNIMkEM+eocFdiHLzT22cNXtJA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGOiQO5phDNbmEaBdl3gLg5qxnd5h5N0wcOvkzEEw6tbAiAUn0wdi4SRT9C05B0j+dlBtqW1yNyi8uoXhl9IgPX3OQ=="}],"size":19953,"noattachment":false,"key":"/apollo-link-ws/-/apollo-link-ws-0.3.0.tgz"},"maintainers":[{"name":"evanshauser","email":"evanshauser@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/apollo-link-ws-0.3.0.tgz_1502320920583_0.9313591006211936"},"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":1502320920788,"_cnpm_publish_time":1502320920788,"dist-tags":{"beta":"2.0.0-beta.0","latest":"1.0.20"}}