🪓 Removed apollo-client
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
import React, { ReactElement, useEffect } from "react";
|
||||
import { Outlet } from "react-router-dom";
|
||||
import { ApolloProvider } from "@apollo/client/react";
|
||||
import { Navbar2 } from "./shared/Navbar2";
|
||||
import { ToastContainer } from "react-toastify";
|
||||
import "../assets/scss/App.css";
|
||||
import { useStore } from "../store";
|
||||
import { apolloClient } from "../graphql/client";
|
||||
|
||||
export const App = (): ReactElement => {
|
||||
useEffect(() => {
|
||||
@@ -13,11 +11,11 @@ export const App = (): ReactElement => {
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<ApolloProvider client={apolloClient}>
|
||||
<>
|
||||
<Navbar2 />
|
||||
<Outlet />
|
||||
<ToastContainer stacked hideProgressBar />
|
||||
</ApolloProvider>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
import { ApolloClient, InMemoryCache, HttpLink } from '@apollo/client';
|
||||
import { LIBRARY_SERVICE_HOST } from '../constants/endpoints';
|
||||
|
||||
const httpLink = new HttpLink({
|
||||
uri: `${LIBRARY_SERVICE_HOST}/graphql`,
|
||||
});
|
||||
|
||||
export const apolloClient = new ApolloClient({
|
||||
link: httpLink,
|
||||
cache: new InMemoryCache(),
|
||||
defaultOptions: {
|
||||
watchQuery: {
|
||||
fetchPolicy: 'cache-and-network',
|
||||
},
|
||||
query: {
|
||||
fetchPolicy: 'network-only',
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user