I am currently using Amplify with AppSync, and I want to grab Bs from every A item created, and populate them as an array of "items" as a result.
I searched up pipeline resolvers to deal with those, but got no luck since they are mostly based on "Grabbing all the Bs with A's ID=something", but what about ID=any.
I just want to follow the single-table architecture for DynamoDB. In this sense, how am I able to grab all the Bs?
schema.graphql:
type A @model {
id: String!
theBs: [B]
}
type B {
id: ID!
A: String!
name: String
}
type BConnection {
items: [B]
nextToken: String
}
type Query {
getBs: BConnection
}