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

bug: Unable to modify roles due to invalid GraphQL query #4881

Open
ogenstad opened this issue Nov 7, 2024 · 0 comments
Open

bug: Unable to modify roles due to invalid GraphQL query #4881

ogenstad opened this issue Nov 7, 2024 · 0 comments
Assignees
Labels
group/frontend Issue related to the frontend (React) priority/2 This issue stalls work on the project or its dependents, it's a blocker for a release type/bug Something isn't working as expected

Comments

@ogenstad
Copy link
Contributor

ogenstad commented Nov 7, 2024

Component

API Server / GraphQL

Infrahub version

v1.1.0-dev

Current Behavior

It's currently not possible to modify roles within the permissions system.

Screenshot 2024-11-07 at 14 56 39

When executing the mutation this query is sent:

mutation CoreAccountRoleUpdate {
  CoreAccountRoleUpdate(
    data: {id: "1805b104-0c6f-5480-58d1-1746489ac8d2", groups: [{id: "1805b104-23e1-38e0-58d4-1746d7a1c09d", display_label: "Infrahub Users", __typename: "CoreAccountGroup"}], permissions: [{id: "1805b103-ed07-5a20-58d0-1746f692f460"}, {id: "1805b103-efb7-a540-58df-1746a4bb1016"}, {id: "1805b103-f091-a9c0-58d2-1746543d2670"}, {id: "1805b103-f337-3eb0-58de-1746c78fc274"}]}
  ) {
    ok
    __typename
  }
}

The returned error:

{
  "data": null,
  "errors": [
    {
      "message": "Field 'display_label' is not defined by type 'RelatedNodeInput'.",
      "locations": [
        {
          "line": 3,
          "column": 110
        }
      ]
    },
    {
      "message": "Field '__typename' is not defined by type 'RelatedNodeInput'.",
      "locations": [
        {
          "line": 3,
          "column": 143
        }
      ]
    }
  ]
}

Expected Behavior

The correct mutation should be sent.

Steps to Reproduce

  1. Start a new instance of Infrahub
  2. Login as admin
  3. Go to Admin -> Users & Permissions
  4. Select the roles tab
  5. Click to edit the "General Access" role
  6. Click to remove "object:::any:allow_other"
  7. Click Update
  8. Note the error

Additional Information

No response

@ogenstad ogenstad added type/bug Something isn't working as expected group/frontend Issue related to the frontend (React) labels Nov 7, 2024
@dgarros dgarros added this to the Infrahub - 1.0.x milestone Nov 9, 2024
@dgarros dgarros added the priority/2 This issue stalls work on the project or its dependents, it's a blocker for a release label Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
group/frontend Issue related to the frontend (React) priority/2 This issue stalls work on the project or its dependents, it's a blocker for a release type/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

3 participants