Open arlyon opened 4 years ago
Describe the bug
I have a schema:
type PageBlock { title: TranslateableText! titleAudio: Int! icon: String! headerImage: AWSURL blocks: [Block!]! } type ParagraphBlock { text: TranslateableText! audio: Int! } type HeaderBlock { text: TranslateableText! audio: Int! } type ImageBlock { url: AWSURL! } union Block = ParagraphBlock | HeaderBlock | ImageBlock type Page @model { id: ID! page: PageBlock! ... more }
One of the fields of my Page model is a PageBlock, which has 0 or more sub-blocks. I can query these just fine:
query { getPage(id: "my_page") { page{ blocks{ ... on HeaderBlock { text {source} audio } ... on ParagraphBlock { text {source} audio } ... on ImageBlock { url } } } } }
I can't however create page blocks. How do I do this?
Amplify CLI Version
4.19.0
Expected behavior
I would expect to be able to create unions.
@arlyon Thanks for reporting it, I was able to recreate this problem you were raising, I take it to the team for discussion.
Describe the bug
I have a schema:
One of the fields of my Page model is a PageBlock, which has 0 or more sub-blocks. I can query these just fine:
I can't however create page blocks. How do I do this?
Amplify CLI Version
4.19.0
Expected behavior
I would expect to be able to create unions.