#Return Data on Mutations

5 messages · Page 1 of 1 (latest)

magic totem
#

My mutations have suddenly a weird behaviour.

My schema looks like this:

type Item {
  id: ID!
  translations: [Translations] @hasMany(indexName: "translationsByObject", fields: ["id"])
  title: String
  description: String
}

type Translations {
  id: ID!
  text: String
}

When I update the item title for example I setup the reponse to also receive the translations, but now the connected tables are not fetched anymore. Can somebody confirm?

magic totem
#

Nobody?

dreamy siren
#

Same issue

meager sequoia
#

Hey @magic totem and @dreamy siren , Could you please provide the version of the Amplify CLI you are using?

brisk oriole
#

Hi, I'm using Gen 2 and have a similar issue. This is an example of the models I'm having issues with -
SettlementAgent: a .model({ name: a.string(), longName: a.string(), settlementAgentTypeId: a.id(), settlementAgentType: a.belongsTo('SettlementAgentType', 'settlementAgentTypeId'), secondarySettlementAgentId: a.id(), secondarySettlementAgent: a.belongsTo('SettlementAgent', 'secondarySettlementAgentId'), mainSettlementAgent: a.hasOne('SettlementAgent', 'secondarySettlementAgentId'), }) .authorization((allow) => [allow.authenticated()])