Apollo client provides a connection to the GraphQL endpoint & a GraphQL cache that lets you manipulate the visual state of the app from the internal cache
index.tsx
to
add a function to create the Apollo client, as follows:
<<Dgraph Cloud-GraphQL-URL>>
with the URL of your Dgraph
Cloud endpoint.
If you didn’t note the URL when you created the Dgraph Cloud backend, don’t
worry, you can always access it from the Dgraph Cloud dashboard in the Overview
tab.
ApolloProvider
component as the root
component. It takes a client
argument, which is the remainder of the app.
Change the root of the app in index.tsx
to use the Apollo component as
follows.