GraphQL Circuit model relationship mapping to CircuitTermination #5288

Closed
opened 2025-12-29 19:26:15 +01:00 by adam · 4 comments
Owner

Originally created by @ryanmerolle on GitHub (Sep 1, 2021).

Originally assigned to: @ryanmerolle on GitHub.

NetBox version

v3.0.0

Feature type

Change to existing functionality

Proposed functionality

Given the below graphql query in demo.netbox.dev

{
  circuit_list(cid: "KDPO0597") {
    id
    cid
    terminations {
      id
      term_side
      site {
        name
      }
      port_speed
      xconnect_id
      provider_network {
        id
      }
      xconnect_id
      pp_info
      description
      last_updated
    }
  }
}

Use case

I would like to be able to query cable_peer or connected_enpoints under terminations in order to query the termination details for each circuit. Currently, you can only go as far as get the pertinent info inside the circuit termination model and not the connected_endpoint specific info.

Database changes

N/A

External dependencies

N/A

Originally created by @ryanmerolle on GitHub (Sep 1, 2021). Originally assigned to: @ryanmerolle on GitHub. ### NetBox version v3.0.0 ### Feature type Change to existing functionality ### Proposed functionality Given the below graphql query in demo.netbox.dev ```bash { circuit_list(cid: "KDPO0597") { id cid terminations { id term_side site { name } port_speed xconnect_id provider_network { id } xconnect_id pp_info description last_updated } } } ``` ### Use case I would like to be able to query cable_peer or connected_enpoints under terminations in order to query the termination details for each circuit. Currently, you can only go as far as get the pertinent info inside the circuit termination model and not the connected_endpoint specific info. ### Database changes N/A ### External dependencies N/A
adam added the type: featurestatus: needs ownerstatus: under review labels 2025-12-29 19:26:15 +01:00
adam closed this issue 2025-12-29 19:26:15 +01:00
Author
Owner

@ryanmerolle commented on GitHub (Sep 1, 2021):

This is pretty much in the same realm of #6829

@ryanmerolle commented on GitHub (Sep 1, 2021): This is pretty much in the same realm of #6829
Author
Owner

@ryanmerolle commented on GitHub (Sep 1, 2021):

I am getting closer:

{
  circuit_list(cid: "KDPO0597") {
    id
    cid
    terminations {
      id
      term_side
      cable {
        termination_a_type {
          app_label
          model
        }
        termination_a_id
        _termination_a_device {
          name
        }
        termination_b_type {
          app_label
          model
        }
        termination_b_id
        _termination_b_device {
          name
        }
      }
      site {
        name
      }
      port_speed
      xconnect_id
      provider_network {
        name
      }
      xconnect_id
      pp_info
      description
      last_updated
    }
  }
}

I do not see the termination_b or termination_a name in the models. If this needs to move to a discussion instead of an issue, I'm fine with that. I am just preemptively testing some common graphql queries I suspect users will look to leverage.

@ryanmerolle commented on GitHub (Sep 1, 2021): I am getting closer: ```bash { circuit_list(cid: "KDPO0597") { id cid terminations { id term_side cable { termination_a_type { app_label model } termination_a_id _termination_a_device { name } termination_b_type { app_label model } termination_b_id _termination_b_device { name } } site { name } port_speed xconnect_id provider_network { name } xconnect_id pp_info description last_updated } } } ``` I do not see the termination_b or termination_a name in the models. If this needs to move to a discussion instead of an issue, I'm fine with that. I am just preemptively testing some common graphql queries I suspect users will look to leverage.
Author
Owner

@github-actions[bot] commented on GitHub (Nov 14, 2021):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Nov 14, 2021): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@github-actions[bot] commented on GitHub (Dec 14, 2021):

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

@github-actions[bot] commented on GitHub (Dec 14, 2021): This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5288