#✅ - How to return an array of customType for a generation route?

4 messages · Page 1 of 1 (latest)

fringe glacier
#

Good evening. I'm very much an Amplify newbie but so far I've been loving it. One thing I'm having difficulty with at the moment is getting an generation call to return an array of a.customType. Here's what I'm trying to do:

    a.customType({
      summary: a.string(),
      entities: a.customType({
        name: a.string(),
        type: a.string(),
      }).array(),
      timeline: a.customType({
        date: a.string(),
        event: a.string()
      }).array(),
      confidence: a.enum(['high', 'medium', 'low'])
    })
  )```
I've tried a few work around such a defining my entity type elsewhere as then referencing it but nothing seems to work.  Any help to pointers would be great! Thx.
vestal bronze
fringe glacier
#

Thanks! I've commented on the issue.

pallid anvilBOT
#

✅ - How to return an array of customType for a generation route?