GraphQL Call on Many-to-many Relationship Does Not Return Related Items #13860
Labels
GraphQL
Related to GraphQL API issues
pending-maintainer-response
Issue is pending a response from the Amplify team.
to-be-reproduced
Used in order for Amplify to reproduce said issue
Before opening, please confirm:
JavaScript Framework
Angular
Amplify APIs
GraphQL API
Amplify Version
v6
Amplify Categories
api
Backend
Amplify CLI
Environment information
Describe the bug
No items are returned by GraphQL call on many-to-many relation. Items exist in the correctly named DynamoDB join table. Specific error is "TypeError: checklistModel.actionModels.items is not iterable"
The definition of the ChecklistModel and ActionModel types are below. All models in the schema file are public (to eliminate any security related errors that may be causing this issue).
Expected behavior
checklistModel.actionModels.items is an array with one item (and so therefore iterable)
Reproduction steps
The error occurs when the EditChecklist component is opened.
Code Snippet
Log output
The item from the join table is shown below. The actionModelId and checklistModelId match the ids from the corresponding ActionModel and ChecklistModel tables. The value returned from the getChecklistModelFromId is also attached.
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: