amplify-studio icon indicating copy to clipboard operation
amplify-studio copied to clipboard

Should allow multiple many to many

Open 24jr opened this issue 3 years ago • 3 comments

Before opening, please confirm:

App Id

No response

Region

No response

Amplify Console feature

No response

Describe the bug

Screen Shot 2021-12-27 at 5 37 28 PM
type BodyArea
  @model
  @auth(
    rules: [
      { allow: public, operations: [read] }
      { allow: groups, groups: ["admin"], operations: [read] }
      { allow: private }
    ]
  ) {
  id: ID!
  key: String!
  name: String!
  symptoms_common: [Symptom] @manyToMany(relationName: "BodyAreaSymptomCommon")
  symptoms_all: [Symptom] @manyToMany(relationName: "BodyAreaSymptomAll")
  body_parts: [BodyPart] @hasMany(indexName: "byBodyArea", fields: ["id"])
}

type BodyPart
  @model
  @auth(
    rules: [
      { allow: public, operations: [read] }
      { allow: groups, groups: ["admin"], operations: [read] }
      { allow: private }
    ]
  ) {
  id: ID!
  key: String!
  name: String!
  symptoms_common: [Symptom] @manyToMany(relationName: "BodyPartSymptomCommon")
  symptoms_all: [Symptom] @manyToMany(relationName: "BodyPartSymptomAll")
  body_area_id: ID! @index(name: "byBodyArea", sortKeyFields: ["key"])
  body_area: BodyArea @belongsTo(fields: ["body_area_id"])
}

type Symptom
  @model
  @auth(
    rules: [
      { allow: public, operations: [read] }
      { allow: groups, groups: ["admin"], operations: [read] }
      { allow: private }
    ]
  ) {
  id: ID!
  key: String!
  name: String!
  dewey: String!
  body_area_common: [BodyArea] @manyToMany(relationName: "BodyAreaSymptomCommon")
  body_area_all: [BodyArea] @manyToMany(relationName: "BodyAreaSymptomAll")
  body_part_common: [BodyPart] @manyToMany(relationName: "BodyPartSymptomCommon")
  body_part_all: [BodyPart] @manyToMany(relationName: "BodyPartSymptomAll")
}

Expected behavior

Works when push backend accept connections on content page crash amplify studio so I tried deleting what I had and doing it through studio but it won't let me

Reproduction steps

use schema provided try and add data in content section and fails if try a m:m connection so try just using data section to create the autogenerated connections but doesnt work for more than one but i need a list of all symptoms and common so need both. Which works completely fine on everything. outside of amplify studio like appsync or from my front end

Build Settings

No response

Additional information

No response

24jr avatar Dec 27 '21 22:12 24jr

Hi @24jr 👋🏽, thanks for raising this! Transferring to the Admin UI repo since this issue seems to be related to the Amplify Studio.

ghost avatar Jan 05 '22 16:01 ghost

@hloriana oh yeah i was thinking thats what amplify console was. Idk how you transfer but this is for amplify studio also https://github.com/aws-amplify/amplify-console/issues/2461

24jr avatar Jan 05 '22 22:01 24jr

This is presently a DataStore limitation with wide-ranging impact across all libraries and platforms, and so their isn't a quick hit solution at present, it's in our backlog to support this in the future, and until then this is disabled within Studio as well.

cslogan-red avatar Jan 06 '22 22:01 cslogan-red