Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save javierfernandes/af922be97817fc675abed7bdc6578ef0 to your computer and use it in GitHub Desktop.

Select an option

Save javierfernandes/af922be97817fc675abed7bdc6578ef0 to your computer and use it in GitHub Desktop.
describeFn(title, () => {
// context
let schema
let apollo // <<< gets sets in the before()
let networkInterface // <<< same
before(async () => {
// .. old stuff here
// start server
await rtm.start() // << this depends on your server
// connect client
networkInterface = new SubscriptionClient(GRAPHQL_ENDPOINT, { reconnect: true }, WebSocket)
apollo = new ApolloClient({ networkInterface })
})
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment