function createProvider(options = {}) {
  // console.log( defaultOptions )
  // Create apollo client
  const { apolloClient, wsClient } = createApolloClient({
    ...getDefaultOptions(),
    ...options
  })
  apolloClient.wsClient = hasAuthToken() ? wsClient : null

  // Create vue apollo provider
  const apolloProvider = new VueApollo({
    defaultClient: apolloClient,
    defaultOptions: {
      $query: {
        // fetchPolicy: 'cache-and-network',
      }
    },
    errorHandler(error) {
      // eslint-disable-next-line no-console
      // console.log( '%cError', 'background: red; color: white; padding: 2px 4px; border-radius: 3px; font-weight: bold;', error.message )
    }
  })

  return apolloProvider
}
/**
 * Create a Vue Apollo provider instance
 */
Create a Vue Apollo provider instance
Create a Vue Apollo provider instance
function createProvider(options = {}) {
  const { apolloClient, wsClient } = createApolloClient({
    ...getDefaultOptions(),
    ...options
  })
  apolloClient.wsClient = hasAuthToken() ? wsClient : null
  const apolloProvider = new VueApollo({
    defaultClient: apolloClient,
    defaultOptions: {
      $query: {
      }
    },
    errorHandler(error) {
    }
  })
  return apolloProvider
}
function createProvider ( options = { } ) { const { apolloClient , wsClient } = createApolloClient ( { ... getDefaultOptions ( ) , ... options } ) apolloClient . wsClient = hasAuthToken ( ) ? wsClient : null const apolloProvider = new VueApollo ( { defaultClient : apolloClient , defaultOptions : { $query : { } } , errorHandler ( error ) { } } ) return apolloProvider }
Create a Vue Apollo provider instance
Create a Vue Apollo provider instance
// console.log( defaultOptions ) // Create apollo client // Create vue apollo provider // fetchPolicy: 'cache-and-network', // eslint-disable-next-line no-console // console.log( '%cError', 'background: red; color: white; padding: 2px 4px; border-radius: 3px; font-weight: bold;', error.message )