mirror of
https://github.com/vitest-dev/vitest.git
synced 2025-12-08 18:26:03 +00:00
* add svelte-multiselect to projects using Vitest * fix typos * Update docs/api/index.md Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
17 lines
440 B
TypeScript
17 lines
440 B
TypeScript
import { 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,
|
|
})
|