Skip to content

Instantly share code, notes, and snippets.

View TariqueNasrullah's full-sized avatar
🎯
Focusing

Tarique TariqueNasrullah

🎯
Focusing
View GitHub Profile
@KazW
KazW / apollo-config.js
Last active January 29, 2022 14:12
Hasura, Nuxt (Vue), Nuxt Auth, Auth0 and Apollo
import { SubscriptionClient } from 'subscriptions-transport-ws'
import { onError } from 'apollo-link-error'
import { setContext } from 'apollo-link-context'
import { split, from } from 'apollo-link'
import { WebSocketLink } from 'apollo-link-ws'
import { getMainDefinition } from 'apollo-utilities'
import { createUploadLink } from 'apollo-upload-client'
import * as ws from 'ws'
export default (context) => {