Skip to content

Commit 3b37722

Browse files
committed
fx: add query mutation subscription section
1 parent 0ccaeac commit 3b37722

File tree

1 file changed

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

1 file changed

+8
-1
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ The schema is used by Apollo’s code generation tool to generate API code that
309309
1. Navigate to your API on the [AWS AppSync console](https://console.aws.amazon.com/appsync/home)
310310
2. On the left side, select Schema
311311
3. When viewing your schema, there should a “Export schema” drop down. Select this and download the `schema.json` file.
312-
4. Add this file to your project as directed by [Apollo Code Generation documentation](https://www.apollographql.com/docs/ios/code-generation/introduction)
312+
4. Add this file to your project as directed by [Apollo Code Generation documentation](https://www.apollographql.com/docs/ios/code-generation/introduction).
313313

314314
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.
315315

@@ -322,6 +322,13 @@ You can alternatively download the introspection schema using the [`fetch-schema
322322
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)
323323
</InlineFilter>
324324

325+
### Performing Queries, Mutations, and Subscriptions with Apollo client
326+
327+
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.
328+
2. Enter your GraphQL operation (query, mutation, or subscription) in the editor and click **Run** to execute it.
329+
3. Observe the request and response structure in the results. This gives you insight into the exact call patterns and structure that Apollo will use.
330+
4. Copy the GraphQL operation from the playground and pass it to Apollo's code generation tool to automatically generate the corresponding API code for your project.
331+
325332
## Connecting to AWS AppSync real-time endpoint
326333

327334
The following example shows how you can create an Apollo client that allows performing GraphQL subscription operations with AWS AppSync.

0 commit comments

Comments
 (0)