fixx
This commit is contained in:
parent
24634c5814
commit
0722cc0628
23
src/components/Views/publicGraphQLClient.ts
Normal file
23
src/components/Views/publicGraphQLClient.ts
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
import { ClientOptions, dedupExchange, fetchExchange, createClient, Exchange } from '@urql/core'
|
||||||
|
import { devtoolsExchange } from '@urql/devtools'
|
||||||
|
|
||||||
|
// FIXME actual value
|
||||||
|
const isDev = true
|
||||||
|
|
||||||
|
// export const baseUrl = 'https://.discours.io'
|
||||||
|
export const baseUrl = 'http://localhost:8000'
|
||||||
|
|
||||||
|
const exchanges: Exchange[] = [dedupExchange, fetchExchange]
|
||||||
|
|
||||||
|
if (isDev) {
|
||||||
|
exchanges.unshift(devtoolsExchange)
|
||||||
|
}
|
||||||
|
|
||||||
|
const options: ClientOptions = {
|
||||||
|
url: baseUrl,
|
||||||
|
maskTypename: true,
|
||||||
|
requestPolicy: 'cache-and-network',
|
||||||
|
exchanges
|
||||||
|
}
|
||||||
|
|
||||||
|
export const publicGraphQLClient = createClient(options)
|
Loading…
Reference in New Issue
Block a user