Skip to content

Commit c34538e

Browse files
Change Apollo Client URI to remote endpoint (#12986)
* Change Apollo Client URI to remote endpoint Updated Apollo Client configuration to use HttpLink with a remote URI. * Change Apollo Client URI to generic URI Updated Apollo Client URI
1 parent c52be95 commit c34538e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/source/integrations/react-native.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ Then wrap your application in the `ApolloProvider` component, like so:
1313
```jsx
1414
import React from "react";
1515
import { AppRegistry } from "react-native";
16-
import { ApolloClient, InMemoryCache } from "@apollo/client";
16+
import { ApolloClient, HttpLink, InMemoryCache } from "@apollo/client";
1717
import { ApolloProvider } from "@apollo/client/react";
1818

1919
// Initialize Apollo Client
2020
const client = new ApolloClient({
21-
uri: "http://localhost:4000/graphql",
21+
link: new HttpLink({ uri: "http://localhost:4000/graphql" }),
2222
cache: new InMemoryCache(),
2323
});
2424

0 commit comments

Comments
 (0)