diff --git a/apps/react-my-playground/src/index.tsx b/apps/react-my-playground/src/index.tsx index a61518b..b0daea2 100644 --- a/apps/react-my-playground/src/index.tsx +++ b/apps/react-my-playground/src/index.tsx @@ -23,13 +23,15 @@ const GRAPHQL_URI = import.meta.env.VITE_BIGCOMMERCE_GRAPHQL_URI const API_TOKEN = import.meta.env.VITE_API_TOKEN const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement) -root.render( - - - - - -) + +// This seems to create 2 apollo clients... +// root.render( +// +// +// +// +// +// ) root.render( diff --git a/apps/react-my-playground/src/pages/Shop/TestPersistCacheApolloProvider.tsx b/apps/react-my-playground/src/pages/Shop/TestPersistCacheApolloProvider.tsx index 0877e06..82eb25e 100644 --- a/apps/react-my-playground/src/pages/Shop/TestPersistCacheApolloProvider.tsx +++ b/apps/react-my-playground/src/pages/Shop/TestPersistCacheApolloProvider.tsx @@ -41,7 +41,6 @@ await persistCache({ }) // Continue setting up Apollo as usual. - const client = new ApolloClient({ link: from([authMiddleware, httpLink]), cache, diff --git a/libs/utils-apollo-provider/src/index.ts b/libs/utils-apollo-provider/src/index.ts index ee873b0..cb53d08 100644 --- a/libs/utils-apollo-provider/src/index.ts +++ b/libs/utils-apollo-provider/src/index.ts @@ -1,2 +1,3 @@ export * from './lib/ApolloProvider' export * from './lib/getCache' +export * from './lib/client'