Daftar Gangguan Dialihkan Ke Posko Lain - Rekapitulasi Gangguan All
(Tabel 1 - Tabel 8)
This commit is contained in:
@ -1,16 +1,24 @@
|
||||
import { ApolloClient, createHttpLink, InMemoryCache } from '@apollo/client/core'
|
||||
|
||||
// HTTP connection to the API
|
||||
const httpLink = createHttpLink({
|
||||
// You should use an absolute URL here
|
||||
uri: 'http://localhost:3020/graphql',
|
||||
})
|
||||
export const apolloClient = () => {
|
||||
|
||||
// Cache implementation
|
||||
const cache = new InMemoryCache()
|
||||
const httpLink = createHttpLink({
|
||||
uri: 'http://10.8.0.13:8080/graphql',
|
||||
credentials: 'include', // Include credentials for cross-origin requests
|
||||
});
|
||||
|
||||
// Create the apollo client
|
||||
export const apolloClient = new ApolloClient({
|
||||
|
||||
const apolloClient = new ApolloClient({
|
||||
cache: new InMemoryCache(),
|
||||
link: httpLink,
|
||||
cache,
|
||||
})
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
'Accept-Encoding': 'gzip, deflate',
|
||||
'Cache-Control': 'no-cache',
|
||||
Connection: 'keep-alive',
|
||||
'Content-Type': 'application/json',
|
||||
// Add other headers as needed
|
||||
},
|
||||
});
|
||||
return apolloClient;
|
||||
}
|
Reference in New Issue
Block a user