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: create/update mutation allows you to set a parent for the "root" of a hierarchy #4325

Closed
wvandeun opened this issue Sep 11, 2024 · 1 comment
Labels
group/backend Issue related to the backend (API Server, Git Agent) type/bug Something isn't working as expected

Comments

@wvandeun
Copy link
Contributor

Component

API Server / GraphQL

Infrahub version

0.16.0.dev0

Current Behavior

When you define a hierarchy in the schema, we define the root of hierarchy by specifying setting an empty parent.
We should therefor not be able to set a parent for nodes that are at the root level of the hierarchy.
It seems that it is possible to set a parent for nodes at the root level, as long as the node that you want to add a parent is inheriting from the generic that defines the hierarchy.

Expected Behavior

We should not be able to define a parent for a node that is at the root of a hierarchy.

Steps to Reproduce

  • load instance of Infrahub
  • load the demo schema
  • load the demo data
  • navigate to continent in the web UI
  • select Europe and click on the edit button
  • in the parent dropdown select country
  • set the country to Australia
  • click save
  • Austrailia is now the parent of Europe
  • Europe dissapears from the hierarchy tree under Australia

Additional Information

No response

@wvandeun wvandeun added type/bug Something isn't working as expected group/backend Issue related to the backend (API Server, Git Agent) labels Sep 11, 2024
@exalate-issue-sync exalate-issue-sync bot added this to the Infrahub - 0.16.1 milestone Sep 11, 2024
@dgarros
Copy link
Collaborator

dgarros commented Sep 23, 2024

Fixed in #4414

@dgarros dgarros closed this as completed Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
group/backend Issue related to the backend (API Server, Git Agent) type/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

2 participants