Skip to content

Commit

Permalink
cache sync test update
Browse files Browse the repository at this point in the history
  • Loading branch information
takahirohonda committed Oct 10, 2024
1 parent 24f0fc6 commit afcac8a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions apps/react-my-playground/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(
<React.StrictMode>
<ApolloProviderReact uri={GRAPHQL_URI} token={API_TOKEN}>
<RouterProvider router={router} />
</ApolloProviderReact>
</React.StrictMode>
)

// This seems to create 2 apollo clients...
// root.render(
// <React.StrictMode>
// <ApolloProviderReact uri={GRAPHQL_URI} token={API_TOKEN}>
// <RouterProvider router={router} />
// </ApolloProviderReact>
// </React.StrictMode>
// )

root.render(
<React.StrictMode>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ await persistCache({
})

// Continue setting up Apollo as usual.

const client = new ApolloClient({
link: from([authMiddleware, httpLink]),
cache,
Expand Down
1 change: 1 addition & 0 deletions libs/utils-apollo-provider/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './lib/ApolloProvider'
export * from './lib/getCache'
export * from './lib/client'

0 comments on commit afcac8a

Please sign in to comment.