{"name":"apollo-link-ws","version":"0.2.1","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.4.1","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.2.1","_shasum":"bec38a7d67c4ec3b740b6b28f8cd4d7a500bcfd6","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.0","_npmUser":{"name":"evanshauser","email":"evanshauser@gmail.com"},"dist":{"shasum":"bec38a7d67c4ec3b740b6b28f8cd4d7a500bcfd6","tarball":"http://registry-npm.ywwl.com/apollo-link-ws/download/apollo-link-ws-0.2.1.tgz","integrity":"sha512-T7dOyWZZTK/Py6sJmvSFQF0ssuYZ5JcQvp0V0ueiH2wW5MYezurHKgI5pRZtscuAyOcvNDB3Cr3jyG7+LpRGxg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICyOAjYTI2iuZ0s2a/4nF3pEjsuB/7wFoY3njPBHpW63AiEA6EYN2YXJE9tWhJlM1aBBT9ozCD1wKg69h+YXCRg7mSg="}],"size":19945,"noattachment":false,"key":"/apollo-link-ws/-/apollo-link-ws-0.2.1.tgz"},"maintainers":[{"name":"evanshauser","email":"evanshauser@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/apollo-link-ws-0.2.1.tgz_1502261344724_0.5223367135040462"},"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":1502261344924,"_cnpm_publish_time":1502261344924,"dist-tags":{"beta":"2.0.0-beta.0","latest":"1.0.20"}}