Skip to content

Commit 4263abe

Browse files
committed
updates
1 parent 26d7333 commit 4263abe

File tree

1 file changed

+25
-12
lines changed
  • src/pages/[platform]/build-a-backend/data/aws-appsync-apollo-extensions

1 file changed

+25
-12
lines changed

src/pages/[platform]/build-a-backend/data/aws-appsync-apollo-extensions/index.mdx

+25-12
Original file line numberDiff line numberDiff line change
@@ -23,27 +23,38 @@ export function getStaticProps(context) {
2323
};
2424
}
2525

26-
AWS AppSync Apollo Extensions provide a seamless way to connect to your AWS AppSync backend using Apollo client, an open-source GraphQL client. The included AWS AppSync authorizers make it simple to apply the correct authorization payloads to your GraphQL operations within the Apollo client. The library allows you to connect directly to your AWS AppSync backend, including AppSync backends managed through Amplify Data.
26+
AWS AppSync Apollo Extensions provide a seamless way to connect to your AWS AppSync backend using Apollo client, an open-source GraphQL client.
2727
<InlineFilter filters={["swift"]}>
2828

2929
To learn more about Apollo, see https://www.apollographql.com/docs/ios/.
3030

3131
</InlineFilter>
3232

33-
3433
<InlineFilter filters={["android"]}>
3534

3635
To learn more about Apollo, see https://www.apollographql.com/docs/kotlin.
3736

3837
</InlineFilter>
3938

39+
## Features
40+
41+
AWS AppSync Apollo Extensions provide AWS AppSync authorizers to be used with the Apollo client to make it simple to apply the correct authorization payloads to your GraphQL operations.
42+
43+
<InlineFilter filters={["android"]}>
44+
Additionally, we publish an optional Amplify extension that allows Amplify to provide auth tokens and signing logic for the corresponding Authorizers.
45+
</InlineFilter>
46+
47+
<InlineFilter filters={["swift"]}>
48+
Additionally, the included Amplify components allow Amplify to provide auth tokens and signing logic for the corresponding Authorizers.
49+
</InlineFilter>
50+
4051
## Install the AWS AppSync Apollo Extensions library
4152

4253
<InlineFilter filters={["android"]}>
4354

4455
<BlockSwitcher>
4556

46-
<Block name=" Amplify Data">
57+
<Block name="With Amplify">
4758

4859
Add the `apollo-appsync-amplify` dependency to your app/build.gradle.kts file.
4960

@@ -58,7 +69,7 @@ dependencies {
5869

5970
</Block>
6071

61-
<Block name="AppSync">
72+
<Block name="Without Amplify">
6273

6374
Add the `apollo-appsync` dependency to your app/build.gradle.kts file.
6475

@@ -93,7 +104,7 @@ Enter its GitHub URL (`https://github.com/aws-amplify/aws-appsync-apollo-extensi
93104

94105
<BlockSwitcher>
95106

96-
<Block name=" Amplify Data">
107+
<Block name="With Amplify">
97108
Before you begin, you will need an Amplify Data backend deploy. To get started, see [Set up Data](/[platform]/build-a-backend/data/set-up-data/).
98109

99110
Once you have deployed your backend and created the `amplify_outputs.json` file, you can use Amplify library to read and retrieve your configuration values with the following steps:
@@ -108,7 +119,7 @@ val apolloClient = ApolloClient.Builder()
108119

109120
### AppSync Authorizers
110121

111-
Depending on the authorization strategy defined on your schema, you can use the corresponding Authorizer. To read more about the strategies and their corresponding auth modes, see [Available authorization strategies](/[platform]/build-a-backend/data/customize-authz/#available-authorization-strategies).
122+
The AWS AppSync Apollo Extensions library provides a number of Authorizer classes to match the various authorization strategies that may be in use in your schema. You should choose the appropriate Authorizer type for your authorization strategy. To read more about the strategies and their corresponding auth modes, see [Available authorization strategies](/[platform]/build-a-backend/data/customize-authz/#available-authorization-strategies).
112123

113124
Some common ones are
114125

@@ -194,7 +205,9 @@ val authorizer = IamAuthorizer {
194205

195206
</Block>
196207

197-
<Block name="AppSync">
208+
<Block name="Without Amplify">
209+
210+
You can create your Apollo client by using our provided AWS AppSync endpoint and authorizer classes.
198211

199212
```kotlin
200213
val endpoint = AppSyncEndpoint("<your_appsync_endpoint>")
@@ -363,7 +376,7 @@ func createApolloClient() throws -> ApolloClient {
363376
}
364377
```
365378

366-
Depending on the authorization strategy defined on your schema, you can use the corresponding Authorizer. To read more about the strategies and their corresponding auth modes, see [Available authorization strategies](/[platform]/build-a-backend/data/customize-authz/#available-authorization-strategies).
379+
The AWS AppSync Apollo Extensions library provides a number of Authorizer classes to match the various authorization strategies that may be in use in your schema. You should choose the appropriate Authorizer type for your authorization strategy. To read more about the strategies and their corresponding auth modes, see [Available authorization strategies](/[platform]/build-a-backend/data/customize-authz/#available-authorization-strategies).
367380

368381
Some common ones are
369382

@@ -382,7 +395,7 @@ The schema is used by Apollo’s code generation tool to generate API code that
382395
<InlineFilter filters={["swift"]}>
383396
1. Navigate to your API on the [AWS AppSync console](https://console.aws.amazon.com/appsync/home)
384397
2. On the left side, select Schema
385-
3. When viewing your schema, there should a “Export schema” drop down. Select this and download the `schema.json` file.
398+
3. Select the "Export schema" dropdown and download the `schema.json` file.
386399
4. Add this file to your project as directed by [Apollo Code Generation documentation](https://www.apollographql.com/docs/ios/code-generation/introduction).
387400

388401
You can alternatively download the introspection schema using the [`fetch-schema`](https://www.apollographql.com/docs/ios/code-generation/codegen-cli#fetch-schema) command with the `amplify-ios-cli` tool.
@@ -393,7 +406,7 @@ You can alternatively download the introspection schema using the [`fetch-schema
393406

394407
1. Navigate to your API on the [AWS AppSync console](https://console.aws.amazon.com/appsync/home)
395408
2. On the left side, select Schema
396-
3. When viewing your schema, there should a “Export schema” drop down. Select this and download the `schema.json` file.
409+
3. Select the "Export schema" dropdown and download the `schema.json` file.
397410
4. Add this file to your project as directed by [Apollo documentation](https://www.apollographql.com/docs/kotlin/advanced/plugin-recipes#specifying-the-schema-location)
398411

399412
</InlineFilter>
@@ -404,7 +417,7 @@ You can alternatively download the introspection schema using the [`fetch-schema
404417

405418
<BlockSwitcher>
406419

407-
<Block name=" Amplify Data">
420+
<Block name="With Amplify">
408421
### Amplify provided .graphql files
409422
1. Within your Amplify Gen2 backend, run: `npx ampx generate graphql-client-code --format graphql-codegen --statement-target graphql --out graphql`
410423
2. Copy the generated files (`mutations.graphql`, `queries.graphql`, `subscriptions.graphql`) to your `{app}/src/main/graphql` folder as shown in the [Apollo documentation](https://www.apollographql.com/docs/kotlin#getting-started)
@@ -417,7 +430,7 @@ You can alternatively download the introspection schema using the [`fetch-schema
417430

418431
</Block>
419432

420-
<Block name="AppSync">
433+
<Block name="Without Amplify">
421434

422435
1. Navigate to the **Queries** tab in your API on the [AWS AppSync console](https://console.aws.amazon.com/appsync/home). Here, you can test queries, mutations, and subscriptions in the GraphQL playground.
423436
2. Enter your GraphQL operation (query, mutation, or subscription) in the editor and click **Run** to execute it.

0 commit comments

Comments
 (0)