-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
46 lines (41 loc) · 1.2 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import React from "react";
import { NavigationContainer } from "@react-navigation/native";
import { SafeAreaProvider } from "react-native-safe-area-context";
import "react-native-gesture-handler";
import { ApolloClient, ApolloProvider, InMemoryCache } from "@apollo/client";
import { LogBox } from "react-native";
import MyActivityIndicator from "./loader/Loader";
import GlobalDataProvider from "./ContextProvider/useAuth";
import AuthStackNavigator from "./Navigation/AuthStackNav";
//SP20-BCS-135
const client = new ApolloClient({
uri: `https://ebay-clone-backend.herokuapp.com/graphql`,
cache: new InMemoryCache({
typePolicies: {
SaveForLater: {
fields: {
userId: {
merge(existing, incoming) {
return incoming;
},
},
},
},
},
}),
});
export default function App() {
LogBox.ignoreAllLogs();
return (
<ApolloProvider client={client}>
<SafeAreaProvider>
<NavigationContainer>
<GlobalDataProvider>
<AuthStackNavigator />
<MyActivityIndicator />
</GlobalDataProvider>
</NavigationContainer>
</SafeAreaProvider>
</ApolloProvider>
);
}