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

GraphQL: Extend relationships further #9478

Closed
ryanmerolle opened this issue Jun 3, 2022 · 2 comments
Closed

GraphQL: Extend relationships further #9478

ryanmerolle opened this issue Jun 3, 2022 · 2 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Milestone

Comments

@ryanmerolle
Copy link
Contributor

NetBox version

v3.2.4

Feature type

Change to existing functionality

Proposed functionality

I am not really going to articulate this well, but I have noticed many GraphQL models do not go very deep into the relationships of other models.

Use case

Examples:

{
  circuit_list {
    id
    cid
    type {
      name
    }
    termination_a {
      _link_peer_type {
        id
      }
    termination_b {
      _link_peer_type {
        id
      }
      _link_peer_id
    }
  }
}

termination_a & termination_b do not (at bare minimum) allow you to grab the display or device keys like you can with the REST API. In reality, you should be able to further follow the path of the relationship to include information about the models related.

Possible Use Cases:
Gather circuit, termination, cable, ip address, and connected peer device/interface/ip details
Filtering circuits based on the status of the site it's attached to @tyler-8 example from chat
Filtering circuits based on the VLAN membership of the interface it's connected to @tyler-8 example from chat.

There are a whole host of items like this where the relationship cannot be followed to the end within graphql. To quote @tyler-8 "Yeah graphql would really shine if we unlocked more of that" .."I'm just not sure how that works in graphene, like if it's "easy" to do that or if you basically have to explicitly define all of those things every time"

Database changes

No response

External dependencies

No response

@ryanmerolle ryanmerolle added the type: feature Introduction of new functionality to the application label Jun 3, 2022
@jeremystretch jeremystretch added the status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation label Jun 7, 2022
@basti1508
Copy link

Since I am creating Switch-Configs from the Information stored in Netbox, the possibility to have the connected_endpoint on an interface would be a real gamechanger.

@jeremystretch jeremystretch added status: blocked Another issue or external requirement is preventing implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Jul 27, 2022
@jeremystretch
Copy link
Member

Blocked by #9856

@jeremystretch jeremystretch added status: under review Further discussion is needed to determine this issue's scope and/or implementation and removed status: blocked Another issue or external requirement is preventing implementation labels Sep 27, 2022
@arthanson arthanson self-assigned this Oct 4, 2022
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Oct 5, 2022
@jeremystretch jeremystretch added this to the v3.4 milestone Oct 5, 2022
jeremystretch added a commit that referenced this issue Oct 6, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

4 participants