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

schema.graphql has incorrect duplicate relationships.

Open qwikag opened this issue 9 months ago • 4 comments

Before opening, please confirm:

  • [X] I have searched for duplicate or closed issues.
  • [X] I have read the guide for submitting bug reports.
  • [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • [X] I have removed any sensitive information from my code snippets and submission.

App Id

whyputappidinpublicforum

Region

ap-southeast-2

Environment name

develop

Figma File Version (if applicable)

N/A

Amplify CLI Version

No response

If applicable, what version of Node.js are you using?

No response

What operating system are you using?

win10

Browser type?

chrome

Describe the bug

Cannot publish a new relationship with Pascal Case: e.g. type Person @model @auth(rules: [{allow: owner, operations: [read, update, create]}, {allow: private, operations: [create, read, update], provider: iam}]) { id: ID! Email: AWSEmail! Username: AWSEmail Firstname: String Lastname: String Mobile: AWSPhone Birthdate: AWSDate Address: String Phone: AWSPhone SystemLogs: [SystemLog] @hasMany(indexName: "byPerson", fields: ["id"]) Logins: [SystemLog] @hasMany(indexName: "byPerson", fields: ["id"]) Bookings: [Booking] @hasMany(indexName: "byPerson", fields: ["id"]) }

type Booking @model @auth(rules: [{allow: private, operations: [read]}, {allow: owner, operations: [create, read, update]}]) { id: ID! Name: String! Start: AWSDateTime Stop: AWSDateTime OrgID: ID! @index(name: "byOrganisation") Status: String OrganiserId: [Booking] @index(name: "byPerson") }

I get this error DeploymentOrganiserId

Expected behavior

It should work just fine.

Reproduction steps

create parent child relationship with aand change the field name from e.g. "personID" --> "PersonId"

Project Identifier

1d91fff5a13778a3f2da7571d70fa642

Additional information

NB: the duplicated SystemLog relationship on the Logins, is also very incorrect. It should be "Login". I have multiple instances of this happening. This too is a separate problem I am logging.

Amplify& AWS is hugely broken, and no longer worth getting involved in until these issues (and many more) get fixed. I now have to take my business elsewhere.

AWS need to take a look at Salesforce and how successful their easy data modelling has been over the last 20years, seldom a failure. And this is due to quality implementation of front end delivering on backend capability.

qwikag avatar Sep 27 '23 06:09 qwikag