{"name":"apollo-link-ws","version":"0.4.1-beta.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":"./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":{"subscriptions-transport-ws":"^0.8.2"},"peerDependencies":{"apollo-link":"^0.6.1-beta.0"},"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","apollo-link":"^0.6.1-beta.0","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.4.1-beta.0","_npmVersion":"5.4.1","_nodeVersion":"8.1.2","_npmUser":{"name":"jbaxleyiii","email":"james@meteor.com"},"dist":{"integrity":"sha512-AnkV1uMv2aVc+MiaLeMsh90nAQy3SN37CgpvTmkG+SQgBtVEzQlrxKIINw76nr3YVeLRXZpAR9YgFRZmIPfreA==","shasum":"93f7735c7306b5eee27708e1d4adf0e29154eec4","tarball":"http://registry-npm.ywwl.com/apollo-link-ws/download/apollo-link-ws-0.4.1-beta.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDg8hRPa7L7yNB+kSNX38I8ey2PPqevS+6+Q7WxGQLoLgIhAK+zSqDEBKRKNTk2yTwH71M+u1odVb2YMcgbbbQdLdHd"}],"size":4259,"noattachment":false,"key":"/apollo-link-ws/-/apollo-link-ws-0.4.1-beta.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.4.1-beta.0.tgz_1505312475938_0.324510030914098"},"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":1505312476888,"_cnpm_publish_time":1505312476888,"dist-tags":{"beta":"2.0.0-beta.0","latest":"1.0.20"}}