Hi,
I have two entities with one to may relationship.
eg:
//schema.graphql
type Main @entity{
id: ID! #address of a contract
}
type Another @entity{
id: ID!
main: Main! #how to set this field in mapping.ts?
amount: BigInt!
}
//mapping.ts
another.main = "" #do I pass in address (which is the ID of the Main entity) of the Main contract?
I am doubtful on what I should add in the relationship field (main
) during mapping? do I pass in the ID of the Main
entity?