Amplify creates relationship between models even though schema.graphql doesnt specify any

26 views Asked by At

I am facing a weird issue where the amplify-cli creates a relationship stack between Foo and Bar model eventhough I have not specified any as you can see in the screenshot

type Foo @model (queries: null, mutations: null, subscriptions: null) {
  id: ID! @primaryKey
  name: String! @index(name: "byName", queryField: "fooByName")
  description: String
}

type Bar @model (queries: null, mutations: null, subscriptions: null) {
  id: ID! @primaryKey
  name: String! @index(name: "byName", queryField: "barByName")
  description: String
}

in build/cloudformation-template.json, I see that the Resources.Bar.Parameters has an entry which doesnt make sense

"referencetotransformerrootstackFooNestedStackFooNestedStackResource8AC2D3F9OutputstransformerrootstackFooQueryfooByNamepostAuth0FunctionQueryfooByNamepostAuth0FunctionAppSyncFunction82371669FunctionId": {
                    "Fn::GetAtt": [
                        "Foo",
                        "Outputs.transformerrootstackFooQueryfooByNamepostAuth0FunctionQueryfooByNamepostAuth0FunctionAppSyncFunction82371669FunctionId"
                    ]
                }

I created 2 different models Foo and Bar without any relationship so I am not expecting any relationship to exist between Foo and Bar in cloudformation-template.json

0

There are 0 answers