🪓 Removed apollo-client

This commit is contained in:
2026-03-05 11:55:46 -05:00
parent ec52906eca
commit 2b4ee716e3
5 changed files with 420 additions and 1082 deletions

View File

@@ -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>
</>
);
};

View File

@@ -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',
},
},
});