Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@ Realm documentation.
[Find your App ID](https://docs.mongodb.com/realm/get-started/find-your-app-id/) and paste it
into ``src/index.js``.

9. Run the App
9. Add Your GraphQL Endpoint

[Find your GraphQL Endpoint (URL)](https://www.mongodb.com/docs/atlas/app-services/graphql/expose-data/) and paste it
into ``src/index.js``.

10. Run the App

```shell
npm run start
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async function getValidAccessToken() {
// Configure the ApolloClient to connect to your app's GraphQL endpoint
const client = new ApolloClient({
link: new HttpLink({
uri: `https://realm.mongodb.com/api/client/v2.0/app/${APP_ID}/graphql`,
uri: `<Your GraphQL Endpoint (URL)>`,
// We define a custom fetch handler for the Apollo client that lets us authenticate GraphQL requests.
// The function intercepts every Apollo HTTP request and adds an Authorization header with a valid
// access token before sending the request.
Expand Down