lemol / umi-plugin-apollo

Apollo graphql plugin for umi
49 stars 3 forks source link

Does it support to make subscriptions? #11

Open petchpool opened 5 years ago

lemol commented 5 years ago

@9wisit, yes you can use subscriptions by adding the subscription link on the options file extraLinks export.

// options.js

const wsLink = new WebSocketLink({
  uri: `ws://localhost:5000/`,
  options: {
    reconnect: true
  }
});

export const extraLinks = [
  wsLink
];

I think we can find a pattern to do this configurable on .umirc.js.