Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

relationships defined in GraphQL are wrong and duplicated #1045

Closed
4 tasks done
qwikag opened this issue Sep 27, 2023 · 3 comments
Closed
4 tasks done

relationships defined in GraphQL are wrong and duplicated #1045

qwikag opened this issue Sep 27, 2023 · 3 comments
Labels
pending-triage An issue that is pending triage

Comments

@qwikag
Copy link

qwikag commented Sep 27, 2023

Before opening, please confirm:

App Id

appIdnotprovided

Region

ap-southeast-2

Environment name

develop

Figma File Version (if applicable)

No response

Amplify CLI Version

12.5.0

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

20.3.1

What operating system are you using?

win10

Browser type?

chrome

Describe the bug

duplicated relationships on the relationships to different tables.
relationshipIncorrect

Mutations is also broken:

export const createPerson = /* GraphQL */ `
  mutation CreatePerson(
    $input: CreatePersonInput!
    $condition: ModelPersonConditionInput
  ) {
    createPerson(input: $input, condition: $condition) {
      id
      Email
      Username
      Firstname
      Lastname
      Mobile
      Birthdate
      Address
      Phone
      SystemLogs {
        items {
          id
          Line
          Code
          Process
          Message
          CreatedDateTime
          personID
          createdAt
          updatedAt
          owner
          __typename
        }
        nextToken
        __typename
      }
      Logins {
        items {
          id
          Line
          Code
          Process
          Message
          CreatedDateTime
          personID
          createdAt
          updatedAt
          owner
          __typename
        }
        nextToken
        __typename
      }
      createdAt
      updatedAt
      owner
      __typename
    }
  }
`;

Queries too:

export const getPerson = /* GraphQL */ `
  query GetPerson($id: ID!) {
    getPerson(id: $id) {
      id
      Email
      Username
      Firstname
      Lastname
      Mobile
      Birthdate
      Address
      Phone
      SystemLogs {
        items {
          id
          Line
          Code
          Process
          Message
          CreatedDateTime
          personID
          createdAt
          updatedAt
          owner
          __typename
        }
        nextToken
        __typename
      }
      Logins {
        items {
          id
          Line
          Code
          Process
          Message
          CreatedDateTime
          personID
          createdAt
          updatedAt
          owner
          __typename
        }
        nextToken
        __typename
      }
      createdAt
      updatedAt
      owner
      __typename
    }
  }
`;

Expected behavior

It should relate to the correct table

Reproduction steps

create multiple relationships on 1 table to multiple others.

now it might be caused by amplify cli push/pull, unknown when this occured.
but it has happened multiple places throughout my datamodel

Project Identifier

1d91fff5a13778a3f2da7571d70fa642

Additional information

unknown on what version this happened.

With this type of behaviour on the console or cli
AWS Amplify is unusable.

@ykethan
Copy link
Member

ykethan commented Sep 27, 2023

The issue is similar to #788. Marking this as duplicate and closing the issue.

@ykethan ykethan closed this as not planned Won't fix, can't repro, duplicate, stale Sep 27, 2023
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@qwikag
Copy link
Author

qwikag commented Sep 27, 2023

@ykethan
that is a slightly different error.
But ok, if you guys are going to fix all errors then no problem ????

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-triage An issue that is pending triage
Projects
None yet
Development

No branches or pull requests

2 participants