function createProvider(authClientOptions = {}, dataClientOptions = {}) {
    authClient = createClient(authClientOptions);
    dataClient = createClient(dataClientOptions);

    // Create vue apollo provider
    const apolloProvider = new VueApollo({
        clients: {
            authClient,
            dataClient
        },
        defaultClient: dataClient,
        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;
}
// Call this in the Vue app file
Call this in the Vue app file
Call this in the Vue app file
function createProvider(authClientOptions = {}, dataClientOptions = {}) {
    authClient = createClient(authClientOptions);
    dataClient = createClient(dataClientOptions);
    const apolloProvider = new VueApollo({
        clients: {
            authClient,
            dataClient
        },
        defaultClient: dataClient,
        defaultOptions: {
            $query: {
            }
        },
        errorHandler(error) {
            console.log(
                '%cError',
                'background: red; color: white; padding: 2px 4px; border-radius: 3px; font-weight: bold;',
                error.message
            );
        }
    });
    return apolloProvider;
}
function createProvider ( authClientOptions = { } , dataClientOptions = { } ) { authClient = createClient ( authClientOptions ) ; dataClient = createClient ( dataClientOptions ) ; const apolloProvider = new VueApollo ( { clients : { authClient , dataClient } , defaultClient : dataClient , defaultOptions : { $query : { } } , errorHandler ( error ) { console . log ( '%cError' , 'background: red; color: white; padding: 2px 4px; border-radius: 3px; font-weight: bold;' , error . message ) ; } } ) ; return apolloProvider ; }
Call this in the Vue app file
Call this in the Vue app file
// Create vue apollo provider // fetchPolicy: 'cache-and-network', // eslint-disable-next-line no-console