aws-amplify / aws-amplify/amplify-studio

Should allow multiple many to many

Open
#433 3 comments 0 reactions 0 assignees View on GitHub
data feature-request studio-ui
Dominant language
No language data
Stars
135
Forks
32
PR merge metrics
No merged PRs in 30d

Description

### Before opening, please confirm:

- [X] I have checked to see if my question is addressed in the [FAQ](https://github.com/aws-amplify/amplify-console/blob/master/FAQ.md).
- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-console/issues?q=is%3Aissue+).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-console/blob/master/CONTRIBUTING.md).
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

### 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

```graphql
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_

Contributor guide

Open the contributing guide

Research direction

Start with the provided GraphQL schema and reproduce the failure in Amplify Studio's Content and Data sections using multiple many-to-many relations. Compare the behavior with AppSync or the frontend, then confirm that both common and all symptom connections can be created and managed without the Studio page crashing.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql
Domain
backend-api-design
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.