getting below error during amplify publish . Unknown type FieldUnion for field fields. Did you forget to add the @model directive the code:
FieldUnion = KeyValueField | AnotherFieldType
type MyObject {
id: ID!
fields: [FieldUnion !]
}
interface Field { its definition here}
type KeyValueField implements Field {
name: String!
value: String
}
type AnotherFieldType implements Field {
label: String!
content: String!
}
There is a single schema.grapghql file . All Resolvers return __typename with some concrete type of union. This union is never used as input in any mutation. amplify cli version was upgraded to 12.14.4 after which this started coming . we dont use @model anywhere . We have AppSync setup that uses Lambda resolvers and no DynamoDB used behind. Lambda talks to DB.