1.0.20 • Published 4 years ago

apollo-link-ws v1.0.20

Weekly downloads
365,993
License
MIT
Repository
github
Last release
4 years ago

title: apollo-link-ws

description: Send GraphQL operations over a WebSocket. Works with GraphQL Subscriptions.

This link is particularly useful to use GraphQL Subscriptions, but it will also allow you to send GraphQL queries and mutations over WebSockets as well.

import { WebSocketLink } from "apollo-link-ws";
import { SubscriptionClient } from "subscriptions-transport-ws";

const GRAPHQL_ENDPOINT = "ws://localhost:3000/graphql";

const client = new SubscriptionClient(GRAPHQL_ENDPOINT, {
  reconnect: true
});

const link = new WebSocketLink(client);

Options

WS 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:

  • uri: a string endpoint to connect to
  • options: a set of options to pass to a new Subscription Client
  • webSocketImpl: a custom WebSocket implementation

By default, this link uses the subscriptions-transport-ws library for the transport.

@kikstart-graphql/client@kikstart-graphql/core@sprucelabs/spruce-skill-server@sprucelabs/spruce-skillreact-native-erxes@igloo_cloud/shared-ui@coderich/autographql@getholo/cli@puzl/puzl-cloud_authorization-modulebitguild-blockchain-sdkirisvr-cloud-util@moonwalker/lifesupportgraphql-playground-react-auth@etherspot/platform-clientdevelapp-regional-frontend@coderich/autograph-server@chargetrip/javascript-sdkecp-frontend@platyplus/hasura-apollo-clientxr3-clientbitcasino-v3@alpine-code/node-red-contrib-thelabreact-nhostmonetrum-node-client@getcaya/prisma-bindingudiachimp.clickgraphql-api-gatewaynet.vixonic.player@collaveinc/quasar-app-extension-workbench-apollo@everything-registry/sub-chunk-1153limegreenjsk2-education-felevellearning-core-sdkhybrid-clientkikstart-graphql-clientkms-web-appgraphcurlgraphql-apollo-clientgraphql-remotegraphql-remote-tmpinfiscenarionextjs-apollonode-red-contrib-chatbotnode-red-contrib-chatbot-bildinode-red-contrib-chatbot-mission-controlngx-losngx-los-authlumen-cmsluminol-webpackluminolminimal-graphqlmm-graphql-toolsneulernext-app-storenevisor-apimake-apollo-clientmeta-serve-webpacklpack-ts-react-apollonodejs-react-typescript--graphql-code-generatormaronato-vue-cli-plugin-apollomchs-documentsdreamfire-frontenddreamfire-gatewayfresh-filesgatsby-source-tutorial-plugingatsby-source-tw-olehgatsby-source-wagtailgatsby-source-wagtail-mastergt-gatsby-wagtailgraphql-thingsgraphql-tower-apollographqlqbgraphql-engine-consolegraphql-basicsgraphql-client-bindingsgraphcool-bindinggraphql-playground-reactgraphql-playground-react-a11ywatchgraphql-playground-react-awsgraphql-playground-react-gitgraphql-playground-react-patchedgraphql-playground-react-shiftgraphql-playground-react-trackinggraphql-playground-react2graphql-nodejs-clienthasurafirehasura-data-enginehasura-sub-fetchfanout-graphql-toolsfervorflaker.megithub-reproduction-apl-issueetherfacefrontend-seiexample-consumer-servicenotus-corenode-red-contrib-gql-subokdb-clientoffix-client-boost
1.0.20

4 years ago

2.0.0-beta.0

4 years ago

1.0.19

5 years ago

1.0.18

5 years ago

1.0.17

5 years ago

1.0.16

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.6.0

6 years ago

0.5.0

6 years ago

0.4.1-beta.6

7 years ago

0.4.1-beta.5

7 years ago

0.4.1-beta.3

7 years ago

0.4.1-beta.4

7 years ago

0.4.1-beta.1

7 years ago

0.4.1-beta.0

7 years ago

0.3.4

7 years ago

0.3.2

7 years ago

0.3.0

7 years ago

0.2.1

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.2.0

7 years ago

0.0.0

7 years ago