From e111ac15f7f5b9e00f3abb6fbd8f58e0497506d6 Mon Sep 17 00:00:00 2001
From: Ivan Artemiev <29709626+iartemiev@users.noreply.github.com>
Date: Mon, 23 Dec 2024 13:16:00 -0500
Subject: [PATCH 1/2] feat(data): add multi-endpoint instructions
---
.../data/connect-to-API/index.mdx | 39 +++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/src/pages/[platform]/build-a-backend/data/connect-to-API/index.mdx b/src/pages/[platform]/build-a-backend/data/connect-to-API/index.mdx
index 0427a514f03..aae775a5366 100644
--- a/src/pages/[platform]/build-a-backend/data/connect-to-API/index.mdx
+++ b/src/pages/[platform]/build-a-backend/data/connect-to-API/index.mdx
@@ -694,3 +694,42 @@ await Amplify.addPlugins([
```
+
+
+
+## Use an additional Data endpoint
+
+If you have an additional Data endpoint that you're managing with a different Amplify project or through other means, this section will show you how to utilize that endpoint in your frontend code.
+
+This is done by specifying the `endpoint` parameter on the `generateClient` function.
+
+```ts
+import { generateClient } from 'aws-amplify/data';
+
+const client = generateClient({
+ endpoint: 'https://my-other-endpoint.com/graphql',
+});
+```
+
+If this Data endpoint shares its authorization configuration (for example, both endpoints share the same user pool and/or identity pool as the one in your `amplify_outputs.json` file), you can specify the `authMode` parameter on `generateClient`.
+
+```ts
+const client = generateClient({
+ endpoint: 'https://my-other-endpoint.com/graphql',
+ authMode: 'userPool',
+});
+```
+
+If the endpoint uses API Key authorization, you can pass in the `apiKey` parameter on `generateClient`.
+
+```ts
+const client = generateClient({
+ endpoint: 'https://my-other-endpoint.com/graphql',
+ authMode: 'apiKey',
+ apiKey: 'my-api-key',
+});
+```
+
+If the endpoint uses a different authorization configuration, you can manually pass in the authorization header using the instructions in the [Set custom request headers](#set-custom-request-headers) section.
+
+
From 8a35eda30abf1ebeed998c57937239033a3e2ce6 Mon Sep 17 00:00:00 2001
From: Ivan Artemiev <29709626+iartemiev@users.noreply.github.com>
Date: Mon, 6 Jan 2025 09:48:13 -0500
Subject: [PATCH 2/2] update snapshot
---
.../Footer/__tests__/__snapshots__/Footer.test.tsx.snap | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/Footer/__tests__/__snapshots__/Footer.test.tsx.snap b/src/components/Footer/__tests__/__snapshots__/Footer.test.tsx.snap
index bde562993a2..cd74396813c 100644
--- a/src/components/Footer/__tests__/__snapshots__/Footer.test.tsx.snap
+++ b/src/components/Footer/__tests__/__snapshots__/Footer.test.tsx.snap
@@ -1,3 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`Footer should render component that matches snapshot 1`] = `"
"`;
+exports[`Footer should render component that matches snapshot 1`] = `""`;