Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
Something went wrong. Try again.
441 B · 17 lines
TypeScript
at commit befbe0c4
123456789101112131415161718import { ApolloClient, HttpLink, InMemoryCache } from '@apollo/client'import fetch from 'cross-fetch'
const cache = new InMemoryCache()
const link = new HttpLink({ uri: 'https://jsonplaceholder.ir/graphql',
// Use explicit `window.fetch` so that outgoing requests // are captured and deferred until the Service Worker is ready. fetch: (...args) => fetch(...args),})
export const client = new ApolloClient({ cache, link,})