Skip to content

Commit

Permalink
Add apollo server configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
aarishgilani committed Feb 16, 2024
1 parent fbc6cdc commit 52b1cdf
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions client/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@ import React from 'react';
import ReactDOM from 'react-dom';
import GlobalStyles from './styles';
import Pages from './pages';
import { ApolloProvider, ApolloClient, InMemoryCache } from "@apollo/client";

const client = new ApolloClient({
uri: "http://localhost:4000/",
cache: new InMemoryCache(),
});

ReactDOM.render(
<React.StrictMode>
<GlobalStyles />
<Pages />
</React.StrictMode>,
<ApolloProvider client={client}>
<GlobalStyles />
<Pages />
</ApolloProvider>,
document.getElementById('root')
);

0 comments on commit 52b1cdf

Please sign in to comment.