Skip to content

fix(data): add native client examples to batch DynamoDB operations page - #8632

Merged
VarshithaPamisetty merged 2 commits into
mainfrom
fix/batch-ddb-native-client-examples
Oct 27, 2026
Merged

VarshithaPamisetty merged 2 commits into
mainfrom
fix/batch-ddb-native-client-examples

Conversation

@VarshithaPamisetty

@VarshithaPamisetty VarshithaPamisetty commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Description of changes:

Step 3 of the batch DynamoDB operations page served TypeScript client code (client.mutations.batchCreatePost) to all nine platforms, because the section had no InlineFilter at all. Added Swift, Android, and Flutter examples using raw GraphQL, and scoped the existing TypeScript example to the JS platforms.

Two schema defects the examples exposed. The Post model had no authorization rule at any level, so neither amplify/data/resource.ts block could be deployed: .transform() fails with "Model Post is missing authorization rules". And Step 1 declared the mutation argument as content while the handler reads ctx.args.contents and every client call passes contents. Both are fixed, and the deployed schema now matches the page.

The custom operation is renamed BatchCreatePost to batchCreatePost, with the handler file renamed to match, so it follows the convention used by every other custom operation in the Gen2 data docs.

The parent custom business logic page carried the same comments, two of which were inaccurate: // arguments that this query accepts and // return type of the query both sat on the likePost mutation, and // 3. set the function has the handler read "has" for "as". Those comments restate what the adjacent code already says, so they are removed rather than corrected. The highlight-* renderer directives are kept, since TokenList.tsx parses them to produce the highlight affordance.

Checks

  • yarn build succeeds with no errors
  • Deployed the page's schema to a sandbox and ran all three documents against the live AppSync endpoint; the responses deserialize into the Kotlin, Swift, and Dart types shown
  • Ran the accessibility scan locally on both changed pages across all nine platforms, light and dark: 36 scans, no violations

Refs #8267

@VarshithaPamisetty
VarshithaPamisetty marked this pull request as ready for review October 26, 2026 10:58
@VarshithaPamisetty
VarshithaPamisetty requested a review from a team as a code owner October 26, 2026 10:58
@VarshithaPamisetty VarshithaPamisetty self-assigned this Oct 26, 2026
@mergify

mergify Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@VarshithaPamisetty
VarshithaPamisetty merged commit 63cb123 into main Oct 27, 2026
13 checks passed
@VarshithaPamisetty
VarshithaPamisetty deleted the fix/batch-ddb-native-client-examples branch October 27, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants